number = int(input('Введите число: '))
summa = 0
while number != 0:
 summa += number
 number = int(input('Введите следующее число: '))
print(summa)