#abc263b. [abc263_b]Ancestor
[abc263_b]Ancestor
Problem Statement
There are people, called Person , Person , , Person .
The parent of Person is Person . Here, it is guaranteed that .
How many generations away from Person is Person ?
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the answer as a positive integer.
Sample Input 1
3
1 2
Sample Output 1
2
Person is a parent of Person , and thus is one generation away from Person .
Person is a parent of Person , and thus is two generations away from Person .
Therefore, the answer is .
Sample Input 2
10
1 2 3 4 5 6 7 8 9
Sample Output 2
9