Liars
In a talk show, there are N participants who all know each other. Among them, some always lie, while others always tell the truth (with at least one truth-teller present). At the end of the program, the host wants to determine which group each participant belongs to. To achieve this, he asks everyone the question: "How many of you always tell the truth?" Each participant responds with a number between 0 and N. After collecting these responses, the host can choose certain individuals to ask the same question again. Based on their answers, he can definitively identify who tells the truth and who lies. Participants will only answer the second question about the people selected by the host.
Write a program that, given the number of talk show participants and their answers to the first question, determines the minimum number of people the host needs to select for the second round of questioning.
Input
The first line contains a single integer N (1 ≤ N ≤ 1000) - the number of participants in the talk show. The next line contains N integers ranging from 0 to N - the answers each participant gave to the first question.
Output
Output a single integer - the minimum number of participants the host needs to select for the repeated questioning. If the host can already identify the liars and truth-tellers after the first round of questioning, output the number 0.