#using for loop
"""
n=input("enter a no you waana find sum")
sum=0
for i in range(0,len(n)):
    sum+=int(n[i])
print(sum)             

"""

#using while loop

n=input("enter any multiple digit")
i=0
sum=0
while i<len(n):
    sum+=int(n[i])
    i+=1
print(sum)
