The program gets a sequence of non-negative integers as input. Each integer is written on a separate line. The sequence contains an integer 0. After reading 0, the program should terminate and output the length of the sequence (do not count the final 0).
Sample Input 1:
3
2
1
0
Sample Output 1:
3