#include "bits/stdc++.h" using namespace std; #define DEBUG(x) cout<<#x<<": "< #define vl vector #define vii vector< vector > #define vll vector< vector > #define vs vector #define pii pair #define pis pair #define psi pair const int inf = 1000000001; const ll INF = 1e16; #define MOD 1000000007 #define mod 1000000009 #define pi 3.14159265358979323846 #define Sp(p) cout< > > adj(N, vector< pair >()); vll hyou(8, vl(8, 0)); vl d(N, INF); vi r(8); int main() { int h, n; cin >> h >> n; int i, h2, cnt = 1; for (i = 0; i < n-1; i++) { cin >> h2; if (h2 > h) { cnt++; } } cout << cnt; switch (cnt%10) { case 1: cout << "st" << endl; break; case 2: cout << "nd" << endl; break; case 3: cout << "rd" << endl; break; default: cout << "th" << endl; break; } }