#include using namespace std; int main() { int H, N, a, ans = 1; cin >> H >> N; for (int i = 1; i < N; i++) { cin >> a; if (a > H) ans++; } cout << ans; if (ans == 1) cout << "st" << endl; else if (ans == 2) cout << "nd" << endl; else if (ans == 3) cout << "rd" << endl; else cout << "th" << endl; }