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; for (int i = 1; i < n; i++) a[i] = int.Parse(Console.ReadLine().Trim()); Array.Sort(a); Array.Reverse(a); for (int i = 0; i < n; i++) if (a[i] == h1) print(i); } public static void print(int a) { Console.Write(a + 1); 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(b); } }