using System; using System.Collections.Generic; using System.Linq; using System.Numerics; namespace _0446 { class Program { static void Main(string[] args) { var x = Console.ReadLine().Split().Select(int.Parse).ToArray(); var h = x[0]; var n = x[1]; var cnt = 0; for (var i = 0; i < n-1; i++) { var d = int.Parse(Console.ReadLine()); if (h < d) { cnt++; } } var chk = (cnt + 1).ToString(); if (chk.IndexOf("1",chk.Length-1) != -1) { Console.WriteLine(chk + "st"); } else if (chk.IndexOf("2",chk.Length-1) != -1) { Console.WriteLine(chk + "nd"); } else if (chk.IndexOf("3",chk.Length-1) != -1) { Console.WriteLine(chk + "rd"); } else { Console.WriteLine(chk + "th"); } } } }