Problem Description
Peanut does not like to go out very much, and is too lazy to cook, so he has kept a stock of N packets of instant noodles at home.
Each instant noodle pack i expires on day Di, which means Peanut must eat it on or before that day.
On each day, starting from day 1, Peanut can either eat one pack, or not eat any. Determine what is the maximum number of packets Peanut can finish.
Limits
Subtask 1 (36%): 1 ≤ N ≤ 1000, 1 ≤ Di ≤ 1000.
Subtask 2 (21%): 1 ≤ N ≤ 1000, 1 ≤ Di ≤ 109.
Subtask 3 (43%): 1 ≤ N ≤ 200000, 1 ≤ Di ≤ 109.
Subtask 4 (0%): Sample Testcases.
Input
The first line of input contains one integer, N.
The second line of input contains N integers, representing the array D.
Output
The only line of output should contain one integer, the maximum number of noodles Peanut can eat.
Sample Testcase 1
Input
5
1 2 3 3 6
Output
4
Sample Testcase 2
Input
7
1 2 2 4 4 8 4
Output
5