#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define FOR(I,A,B) for(int I = (A); I < (B); ++I) #define CLR(mat) memset(mat, 0, sizeof(mat)) typedef long long ll; int main() { ios::sync_with_stdio(false); cin.tie(0); int H, N; cin>> H >> N; vector h(N-1); FOR(i,0,N-1) cin >> h[i]; sort(h.rbegin(), h.rend()); int x = 1; FOR(i,0,N-1) { if(h[i] > H) x++; else break; } if(x % 10 == 1) cout << x << "st" << endl; else if(x % 10 == 2) cout << x << "nd" << endl; else if(x % 10 == 3) cout << x << "rd" << endl; else cout << x << "th" << endl; return 0; }