import java.util.* fun main(args: Array) { val sc = Scanner(System.`in`) val h = sc.nextInt() val n = sc.nextInt() val c = 1 + (1 until n).map { sc.nextInt() } .filter { h < it } .count() val suf = when (c) { 1 -> "st" 2 -> "nd" 3 -> "rd" else -> "th" } println("$c$suf") }