Logic is not taught in Canadian math classes anymore, and Leo sets out to fix that by adding this logic question to Project Feng.
Leo will give you ~N~, (~1 \leq N \leq 64~) statements, like so:
Exactly ~A_1~ of these statements are true.
Exactly ~A_2~ of these statements are true.
Exactly ~A_3~ of these statements are true.
Exactly ~A_N~ of these statements are true.
~0 \leq A_i \leq 64~ for all ~i~. Leo tells you that some of these statements are true, and others are false. He then asks you, how many of these statements are true?
The first line will contain the positive integer ~N~. The next ~N~ lines each contain a single positive integer, the sequence ~A_1~ to ~A_N~.
Output a single nonnegative integer, the number of statements that are true. If there are multiple correct answers, output the greatest. If there are no possible answers, output
Sample Input 1
4 0 1 2 3
Sample Output 1
Sample Input 2
4 4 4 4 4
Sample Output 2
Sample Input 3
Sample Output 3
Explanation for Sample 3
This is an Epimenides paradox. If the statement is true, then it must be false. It the statement is false, then it must be true.