#include using namespace std; int main() { int h, n, t, ans = 1; string s = "th"; cin >> h >> n; while (--n) { cin >> t; if (t > h) ans++; } if (ans % 10 == 1) s = "st"; else if (ans % 10 == 2) s = "nd"; else if (ans % 10 == 3) s = "rd"; cout << ans << s << endl; return 0; }