#include #include using namespace std; int main(){ int h, n; cin >> h >> n; int a[n - 1]; for(int &i:a) cin >> i; sort(a, a + n - 1); int ans = n - (upper_bound(a, a + n - 1, h) - a); if(ans == 1){ cout << "1st" << endl; }else if(ans == 2){ cout << "2nd" << endl; }else if(ans == 3){ cout << "3rd" << endl; }else{ cout << ans << "th" << endl; } return 0; }