Elephant Semyon is a member of the sports club "CycloForces". In this club, all participants are assigned levels. To achieve level $$$K$$$, one must participate in at least $$$K$$$ races, each at least $$$K$$$ kilometers long. The level increases whenever possible.
Elephant Semyon remembers the distances of all his races. Help him determine his level.
The first line of the input contains a single integer $$$n$$$ ($$$1 \le n \le 10^5$$$) — the number of races.
Each of the following $$$n$$$ lines contains a single integer $$$a_i$$$ ($$$1 \le a_i \le 10^9$$$) — the length of the next race.
Output a single integer — the rating of Elephant Semyon.
Solutions that work correctly for $$$n \le 15$$$ will be scored 20 points.
Solutions that work correctly for $$$n \le 1000$$$ will be scored 50 points.
Solutions that work correctly for $$$a_i \le 10^5$$$ will be scored 80 points.
531415
3
In the example, Elephant Semyon completed $$$5$$$ races. Among them, there are $$$3$$$ races with a distance of at least $$$3$$$ kilometers each (these are the races of $$$3$$$, $$$4$$$, and $$$5$$$ km), so Elephant Semyon's level can be $$$3$$$. It can be shown that he has not yet reached the next level.
| Name |
|---|


