#include #include using namespace std; int main(){ int H,N,x,count=1; cin >> H >> N; N--; while(N--){ cin >> x; if(x>H) count++; } if(count==1) cout << "1st\n"; else if(count==2) cout << "2nd\n"; else if(count==3) cout << "3rd\n"; else cout << count << "th\n"; return 0; }