//Normal #define _GLIBCXX_DEBUG #define ll long long #include using namespace std; using Graph = vector>; void print(auto a){ cout << a; } void prints(auto a){ cout << a << " "; } void prints(){ cout << " "; } void printl(auto a){ cout << a << endl; } void printl(){ cout << endl; } void fix(int n){ cout << fixed << setprecision(n); } int main(){ int H, N; cin >> H >> N; int rank = 1; for(int i = 0; i < N-1; i++){ int X; cin >> X; if(H < X) rank++; } print(rank); rank == 1 ? printl("st") : rank == 2 ? printl("nd") : rank == 3 ? printl("rd") : printl("th"); return 0; }