#include #include using namespace std; using ll = long long; int main() { int m, n, h[100]; scanf("%d %d", &m, &n); for (int i = 1; i < n; i++) scanf("%d", h + i); h[0] = m; sort(h, h + n); int up = n, down = 0, center = n / 2; while (2 <= up - down) { if (h[center] <= m) down = center; else up = center; center = (up + down) / 2; } char ffix[4][3] = { "st", "nd", "rd", "th" }; printf("%d%s\n", n - center, ffix[min(n - center - 1, 3)]); }