#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 << t << "st" << endl; break; case 2: cout << t << "nd" << endl; break; case 3: cout << t << "rd" << endl; break; default: cout << t << "th" << endl; break; } return 0; }