#include using namespace std; int main() { int h,n; cin >> h >> n; int H,ans = 1; for(int i = 0; i < n - 1; i++){ cin >> H; if(h < H) 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; return 0; }