otv = list(str(number))
num = 0
for i in otv:
num += int(i)
print(num)
x = int(input())
s = 0
while x > 0:
s += x % 10
x //= 10
print(s)
otv = list(str(number))
num = 0
for i in otv:
num += int(i)
print(num)
x = int(input())
s = 0
while x > 0:
s += x % 10
x //= 10
print(s)