import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int h = sc.nextInt(); int n = sc.nextInt(); int[] x = new int[n - 1]; for(int i = 0 ; i < n - 1 ; i++) x[i] = sc.nextInt(); Arrays.sort(x); int level = 1; for(int i = n - 2 ; i >= 0 ; i--) { if(h > x[i]) { if(level < 10) { if(level == 1) { System.out.println(level + "st"); return; } else if(level == 2) { System.out.println(level + "nd"); return; } else if(level == 3) { System.out.println(level + "rd"); return; } else { System.out.println(level + "th"); return; } } else if(level < 100) { if(level % 10 == 1) { System.out.println(level + "st"); return; } else if(level % 10 == 2) { System.out.println(level + "nd"); return; } else if(level % 10 == 3) { System.out.println(level + "rd"); return; } else { System.out.println(level + "th"); return; } } else { System.out.println(level + "th"); return; } } else { level++; } } if(level < 10) { if(level == 1) { System.out.println(level + "st"); return; } else if(level == 2) { System.out.println(level + "nd"); return; } else if(level == 3) { System.out.println(level + "rd"); return; } else { System.out.println(level + "th"); return; } } else if(level < 100) { if(level % 10 == 1) { System.out.println(level + "st"); return; } else if(level % 10 == 2) { System.out.println(level + "nd"); return; } else if(level % 10 == 3) { System.out.println(level + "rd"); return; } else { System.out.println(level + "th"); return; } } else { System.out.println(level + "th"); return; } } }