#include using namespace std; int main(){ int h,n;cin>>h>>n; int nw = 1; for(int i = 0; n-1 > i; i++){ int z;cin>>z; if(h <= z){ nw++; } } if(nw == 1){ cout << "1st" << endl; }else if(nw == 2){ cout << "2nd" << endl; }else if(nw == 3){ cout << "3rd" << endl; }else{ cout << nw << "th" << endl; } }