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