x=0
nums = []
while True:
for j in input():
nums += [j]
for i in nums:
x += i
if x == 0:
print(x)
break
for i in nums:
i = int(i)
x += i
int(i) for i in nums:
x += i
for i in nums:
x += int(i)
for i in nums:
x += [i]