Seats $1$ to $100$ start empty. People state a desired seat in order; a person sits if that seat is still empty, otherwise they are rejected. Print how many people are rejected.
Input
Line 1: $n$ ($1 \le n \le 100$). Line 2: the $n$ requested seat numbers ($1$ to $100$).
Output
Print the number of rejected people.
Example 1
Input
5 1 2 3 2 1
Output
2
Discussion
Threads about this problem. Spoilers are collapsed; wrap hints in
||double bars||.No discussion yet. Start a thread if something here needs explaining.