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