def digit_sum(n):
sum = 0
new_n = n
while new_n > 10:
s = n%10
new_n = (new_n - s)//10
sum = sum + s
else:
sum = sum + new_n
print (sum)
#z = int (input ("Введите число:"))
digit_sum(2564)
ZGVmIGRpZ2l0X3N1bShuKToKCXN1bSA9IDAKCW5ld19uID0gbgoJd2hpbGUgbmV3X24gPiAxMDoKCQlzID0gbiUxMAoJCW5ld19uID0gKG5ld19uIC0gcykvLzEwCgkJc3VtID0gc3VtICsgcwoJZWxzZToKCQlzdW0gPSBzdW0gKyBuZXdfbgoJCXByaW50IChzdW0pCgojeiA9IGludCAoaW5wdXQgKCLQktCy0LXQtNC40YLQtSDRh9C40YHQu9C+OiIpKQpkaWdpdF9zdW0oMjU2NCk=