while input append int print sum

1
2
3
x, y = 1, []
while x != "0": x = input(); y.append(int(x))
print (sum(y))