#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define Would #define you const int INF = 999999999; const int MOD = 1e9 + 7; int a, b, k[105], ans; int main() { cin >> a >> b; for (int i = 0; i < b; ++i) { cin >> k[i]; } sort(k, k + b); reverse(k, k + b); for (int i = 0; i < b; ++i) { if (k[i] < a) { ans = i; } } cout << ans; string mor; if (ans % 10 == 1) { mor = "st"; } else if (ans % 10 == 2) { mor = "nd"; } else if (ans % 10 == 3) { mor = "rd"; } else { mor = "th"; } cout << mor << endl; }