let () = let h, n = stdin.ReadLine() |> fun l -> l.Split() |> Array.map int |> fun arr -> (arr.[0], arr.[1]) seq { for i in 2..n -> stdin.ReadLine() |> int } |> Seq.filter (fun hn -> hn > h) |> Seq.length |> (+) 1 |> (function | r when r % 10 = 1 -> System.String.Format("{0}st", r) | r when r % 10 = 2 -> System.String.Format("{0}nd", r) | r when r % 10 = 3 -> System.String.Format("{0}rd", r) | r -> System.String.Format("{0}th", r)) |> printfn "%s"