#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { int i, j, k; int h, n; vectornum; cin >> h >> n; n--; num.push_back(-1); for (i = 0; i < n; i++) { int nn; cin >> nn; num.push_back(nn); } sort(num.begin(), num.end(), greater()); bool flag = false; for (i = 1; i <= n; i++) { if (num[i] < h) { string st; int ii = i % 10; if (ii == 1) st = "st"; if (ii == 2) st = "nd"; if (ii == 3) st = "rd"; if (ii >= 4 || ii== 0) st = "th"; cout << i+1 << st << endl; flag = true; break; } } if (flag == false) { string st; if (n == 0) st = "st"; if (n == 1) st = "nd"; if (n == 2) st = "rd"; if (n == 3) st = "th"; cout << n + 1 << st << endl; } getchar(); getchar(); return 0; }