How do we evaluate the success of a scientist? By the number of published papers or by their impact - more precisely, the number of citations? Both elements matter. We say that a scientific paper has a citation score
A scientist's h-index is defined as the largest number
Write a programme that inputs the citation scores of all papers of a given scientist and outputs their h-index.
Input Specification
The first line of input contains the positive integer
The following line contains
Output Specification
The first and only line of output must contain the required h-index.
Sample Input 1
5
1 1 4 8 1
Sample Output 1
2
Explanation for Sample Output 1
The scientist has two papers with citation scores larger than or equal to
Sample Input 2
5
8 5 3 4 10
Sample Output 2
4
Explanation for Sample Output 2
The scientist has four papers with citation scores larger than or equal to
Comments