Entering numbers until zero
Integers are entered until a zero is entered. Write a program that prints how many numbers were entered, not counting the zero.
Input: every line contains an integer different from zero, except the last one, which contains a zero.
Output: the number of numbers entered.
Example 1
Input
5
12
-5
675
-123
0Output
5Example 2
Input
0Output
0