#include int main() { int H, n; scanf("%d %d", &H, &n); int i; int h[102]; for (i = 0; i < n - 1; i++) scanf("%d", &h[i]); int ans = 1; for (i = 0; i < n - 1; i++) if (h[i] > 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"); return 0; }