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

Задача 44646. Number of elements in the tree


Задача

Темы: Деревья

Count the number of elements in the resulting tree and output this number.


Input

Enter a sequence of integers ending in zero. Zero itself is not included in the sequence.


Output

Print the answer to the problem.

 
Examples
# Input Output
1
7 3 2 1 9 5 4 6 8 0
9