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

Задача 33566. Sequence length


Задача

Темы: Цикл while

The program receives as input a sequence of non-negative integers, each number is written on a separate line. The sequence ends with the number 0, upon reading which the program should finish its work and print the number of members of the sequence (not counting the terminating number 0). Numbers following the number 0 do not need to be read.

Input data: You enter a sequence of integers ending with the number 0 (the number 0 itself is not included in the sequence).
Output: Print the answer to the problem.

Examples
# Input Output
1 1
3
4
8
0
2
1
4