ans = 0 while (n := int(input())) != -1 : ans += n print(ans)