Олимпиадный тренинг

Задача 33709. The sum of the elements of the sequence - 2


Задача

Темы: Цикл while

Find the sum of a sequence of natural numbers if the sign of the end of the sequence is two consecutive numbers 0. Numbers after two zeros should not be involved in solving the problem.

Input 
A sequence of natural numbers is entered.

Imprint
Print the answer to the problem.
 

 

Examples
# Input Output
1 2
0
7
0
9
0
0
3
18

Запрещенные операторы:list;[