题号:NC52891
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 32 M,其他语言64 M
Special Judge, 64bit IO Format: %lld
题目描述
The h-index of an author is the largest h where he has at least h papers with citations not less than h.
Bobo has published many papers.
Given

which means Bobo has published

papers with citations exactly i, find the h-index of Bobo.
输入描述:
The input consists of several test cases and is terminated by end-of-file.
The first line of each test case contains an integer n.
The second line contains (n+1) integers
.
输出描述:
For each test case, print an integer which denotes the result.
备注:
* 
* 
* The sum of n does not exceed 250,000.