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