#include using namespace std; int main(){ int n, h[100], t; cin >> h[0] >> n; t = 1; for(int i = 1; i < n; ++i){ cin >> h[i]; if(h[0] < h[i]){ ++t; } } switch(t%10){ case 1: cout << "1st" << endl; break; case 2: cout << "2nd" << endl; break; case 3: cout << "3rd" << endl; break; default: cout << t << "th" << endl; break; } return 0; }