using System; using System.Linq; class Program { public void Solve() { int[] HN = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray(); int rank = 1; for (int i = 0; i < HN[1] - 1; i++) { int H = int.Parse(Console.ReadLine()); if (HN[0] < H) { rank++; } } var rankStr = rank.ToString(); switch (rankStr.Substring(rankStr.Length - 1)) { case "1": Console.WriteLine(rankStr + "st"); break; case "2": Console.WriteLine(rankStr + "nd"); break; case "3": Console.WriteLine(rankStr + "rd"); break; default: Console.WriteLine(rankStr + "th"); break; } } static void Main() { var solver = new Program(); solver.Solve(); } }