#include using namespace std; //-------------------------------------------- #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define RFOR(i,a,b) for(int i=(b)-1;i>=(a);i--) #define REP(i,n) FOR(i,0,n) #define RREP(i,n) RFOR(i,0,n) #define LL long long #define INF INT_MAX/3 //-------------------------------------------- const double EPS = 1e-14; const double PI = acos(-1.0); //-------------------------------------------- int main(){ int h, n; scanf("%d %d",&h, &n); int a; int ans = 1; REP (i, n - 1) { scanf("%d",&a); if (a > h) ans++; } printf("%d",ans); if (ans % 10 == 1) printf("st\n"); else if (ans % 10 == 2) printf("nd\n"); else if (ans % 10 == 3) printf("rd\n"); else printf("th\n"); }