H-Index

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

In research, it is tough to determine how good of a researcher you are. One way that people determine how good you are is by looking at your HH-Index.

Each paper has a certain number of citations. Your HH-Index is the largest number HH such that you have HH papers with at least HH citations. Given the number of citations on each paper you have written, what is your HH-Index?

입력

The first line of input contains a single integer nn (1n100,0001 \leq n \leq 100\\,000), which is the number of papers you have written.

The next nn lines describe the papers. Each of these lines contains a single integer cc (0c1,000,000,0000 \leq c \leq 1\\,000\\,000\\,000), which is the number of citations that this paper has.

출력

Display your HH-Index.