using System; public class Hello { public static void Main() { string[] line = Console.ReadLine().Trim().Split(' '); var h1 = int.Parse(line[0]); var n = int.Parse(line[1]); var a = new int[n]; a[0] = h1; var count = 0; for (int i = 1; i < n; i++) if (int.Parse(Console.ReadLine().Trim()) > h1) count++; print(count); } public static void print(int a) { var w = (a + 1) % 10; string b; if (w == 1) b = "st"; else if (w == 2) b = "nd"; else if (w == 3) b = "rd"; else b = "th"; Console.WriteLine((a + 1).ToString() + b); } }