using System; namespace y { class Program { static void Main(string[] args) { string[] ss = Console.ReadLine().Split(); int h = int.Parse(ss[0]); int n = int.Parse(ss[1]); int a = 1; for (int i = 0; i < n; i++) { int h2 = int.Parse(Console.ReadLine()); if (h < h2) { a++; } } switch (a) { case 1: Console.WriteLine("1st"); break; case 2: Console.WriteLine("2nd"); break; case 3: Console.WriteLine("3rd"); break; default: Console.WriteLine("{0}th",a); break; } } } }