C. Seats
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

The Kingdom of Tree is preparing to hold a grand celebration!

As the celebration designer of the Kingdom of Tree, Shirost is preparing to invite $$$n$$$ guests to attend the celebration. There are a total of $$$2n$$$ seats prepared for the celebration, each seat can only accommodate one person and each person sits in exactly one seat. Shirost initially plans to arrange the $$$i$$$-th guest in the $$$i$$$-th seat. However, the president has surveyed the wishes of these $$$n$$$ guests, and the desired seat for the $$$i$$$-th guest is the $$$a_i$$$-th seat. But unless they can sit in their desired seat, they would only sit in their original seat. The president hopes that Shirost can modify the plan to maximize the number of guests sitting in their desired seats.

Formally, you need to find an array $$$b_i$$$ of length $$$n$$$ ($$$1 \leq i \leq n, 1 \leq b_i \leq 2n$$$) satisfying $$$\forall i \neq j,b_i \neq b_j$$$ and $$$\forall i, b_i=i$$$ or $$$b_i=a_i$$$. Morever, you should maximize the number of $$$b_i = a_i$$$.

You only need to output the maximum number.

Input

The first line contains an integer $$$n$$$ ($$$1 \leq n \leq 10^{5}$$$), representing the total number of guests.

The second line contains $$$n$$$ integers $$$a_i$$$ ($$$1 \leq a_i \leq 2n$$$), separated by spaces, representing the desired seats of each guest.

Output

Output a single integer on a single line, representing the maximum number of guests sitting in their desired seats.

Example
Input
5
2 6 4 5 3
Output
5
Note

Example explanation:

All guests can move to their desired seats.