package yukicoder; import java.util.Scanner; public class No564 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int h = sc.nextInt(); int n = sc.nextInt(); int cnt = 1, other; for(int i = 0; i < n - 1; i++) { other = sc.nextInt(); if(other > h) cnt++; } switch(cnt % 10) { case 1: System.out.println(cnt + "st"); break; case 2: System.out.println(cnt + "nd"); break; case 3: System.out.println(cnt + "rd"); break; default: System.out.println(cnt + "th"); break; } } }