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