#include using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int H, N; cin >> H >> N; vector Hs(N - 1); for (auto & h : Hs) cin >> h; int r = 1; for (int i = 0; i != Hs.size(); ++i){ if (Hs[i] > H) ++r; } if (r % 10 == 1){ cout << r << "st" << endl; // 11th でなく、11st }else if (r % 10 == 2){ cout << r << "nd" << endl; // 12th でなく、12nd }else if (r % 10 == 3){ cout << r << "rd" << endl; // 13th でなく、13rd }else{ cout << r << "th" << endl; } return 0; }