package m.shin; import java.util.Scanner; public class Con564 { public static void main(String[] args) { Scanner s = new Scanner(System.in); int H = s.nextInt() , N = s.nextInt(); int count = 1; for(int i = 0;i < N-1;i++){ int h = s.nextInt(); if(h > H){ count++; } } s.close(); String rank = count + "th"; switch(count){ case 1:rank = "1st"; break; case 2:rank = "2nd"; break; case 3:rank = "3rd"; break; } System.out.println(rank); } }