Write a program which reads an integer and prints sum of its digits.
a = list(input())
b = [int(a) for a in a]
print(sum(b))
while True:
    number = input()
    if(number == "0"): 
        break
    print(sum([int(a) for a in list(number)]))