#include int main() { int H, h[100] = {0}, N, i, count = 1; scanf ("%d %d", &H, &N ); for (i = 0; i < N-1; i++) { scanf("%d", &h[i]); if (H < h[i]) { count++; } } if (count%100%10 == 1) { printf("%dst\n", count); } else if (count%100%10 == 2) { printf("%dnd\n", count); } else if (count%100%10 == 3) { printf("%drd\n", count); } else { printf("%dth\n", count); } return 0; }