#include using namespace std; int main(void) { int h, n, a; cin >> h >> n; int rank = 1; for (int i = 0; i < n - 1; ++i) { cin >> a; if (a > h) ++rank; } string ordinal = "th"; if (rank == 1) ordinal = "st"; else if (rank == 2) ordinal = "nd"; else if (rank == 3) ordinal = "rd"; cout << rank << ordinal << endl; return 0; }