Pete's dad#5174

Pete's dad

1 second
64 megabytes
Easy

Petya's dad works at the company "Macrohard". According to him, there are employees in this world-famous company, but only one writes code—the dad. All the others assign tasks to their subordinates. Each employee may have any number of direct supervisors, but each employee, except for Petya's dad, has only one direct subordinate to whom they can assign tasks.

Recently, the company decided to reorganize so that Petya's dad would report directly to all the other employees. To achieve this, the following steps are performed: an employee is chosen, and both this person and everyone they can give orders to—either directly or through their subordinates—are all appointed as direct supervisors of Petya's dad.

It is necessary to reorganize the company in the minimal number of steps. Strangely enough, Petya's dad has been assigned to solve this task. Help him.

Input

The first line of the input contains the number — the total number of employees in the company (1 \leq n \leq 100\,000).

The second line contains n - 1 numbers ranging from to — the -th number indicates the direct subordinate of the employee numbered i + 1. Petya's dad is assigned the number in the company.

Output

The output should be a single number — the minimum number of steps required to reorganize the company.

Examples

Example 1

Loading
Loading