class Program { static void Main(string[] args) { string[] input = Console.ReadLine()!.Split(' '); int myHeight = int.Parse(input[0]); int total = int.Parse(input[1]); int count = 1; for (int i = 0; i < total - 1; i++) { int height = int.Parse(Console.ReadLine()!); if (height > myHeight) { count++; } } if (count % 10 == 1) { Console.WriteLine(count + "st"); } else if (count % 10 == 2) { Console.WriteLine(count + "nd"); } else if (count % 10 == 3) { Console.WriteLine(count + "rd"); } else { Console.WriteLine(count + "th"); } } }