There are $$$n $$$ folders in a computer, indexed from $$$1$$$ to $$$n $$$. The folder indexed $$$1$$$ is the root folder, and each folder may contain several subfolders, forming a tree structure. You can perform several "cut" operations, each cutting a source folder into a target folder. Note that the target folder cannot be the same as the source folder, nor can it be the source folder's subfolder, subfolder's subfolder, and so on. Obviously, the root folder cannot be cut, and it will always be the root folder. Find out that at least how many "cut" operations should be performed so that each folder contains at most one subfolder.
The first line contains a single integer $$$n\ (1\leq n \leq 10^5)$$$ — the number of folders. The second line of each test case contains $$$n-1$$$ space separated integers $$$p_2, p_3, \cdots,p_{n}\ (1\leq p_i\leq n)$$$ — $$$p_i$$$ represents the index of the parent folder of folder $$$i$$$.
Output the minimum number of "cut" operations performed. Note that there may not be a need to perform "cut" operation. Please output $$$0 $$$ in this case.
5 1 1 3 3
2
Here is the explanation for the first sample.
| Name |
|---|


