#include #define FOR(i,bg,ed) for(ll i=(bg);i<(ed);i++) #define REP(i,n) FOR(i,0,n) #define MOD 1000000007 #define int long long using namespace std; typedef long long ll; typedef vector> mat; const int INF = 1e9; int H, N; int Hi[1010]; signed main() { cin >> H >> N; int ans = 1; REP(i,N-1) { cin >> Hi[i]; if (H < Hi[i]) ans++; } if (ans % 10 == 1) { cout << ans << "st" << endl; } else if (ans % 10 == 2) { cout << ans << "nd" << endl; } else if (ans % 10 == 3) { cout << ans << "rd" << endl; } else { cout << ans << "th" << endl; } }