while True:
try:
l = list(map(int,input().split()))
if l[0] == 0:
print(0)
else:
print(sum(l[0:len(l)]))
except:
break