while True: A = list(map(int, input().strip().split())) if A[0] == 0: break print(sum(A[1:]))