Write a program which reads an integer and prints sum of its digits.
x=1
while x!=0:
    x=list(input())
    x=map(int,x)
    x=sum(x)
    print(x)
x=1
while True:
    x=list(input())
    x=map(int,x)
    x=sum(x)
    if x==0:
        break
    print(x)