#include "bits/stdc++.h" using namespace std; typedef long long ll; #define rep(i,n) for(int i=0;i<(int)(n);i++) int gcd(int a,int b){return b?gcd(b,a%b):a;} int main() { cin.tie(0); ios::sync_with_stdio(false); int h,n,other,rank=1; cin >> h >> n; rep(i,n-1) { cin >> other; if (other>h) rank++; } cout << rank; switch (rank%10) { case 1: cout << "st"; break; case 2: cout << "nd"; break; case 3: cout << "rd"; break; default: cout << "th"; break; } cout << endl; return 0; }