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]; x[0] = h; for(int i = 1 ; i < n ; i++) x[i] = sc.nextInt(); Arrays.sort(x); for(int i = n - 1 ; i >= 0 ; i--) { if(h == x[i]) { int rank = n - i; if(rank % 10 == 1) { System.out.println(rank + "st"); return; } else if(rank % 10 == 2) { System.out.println(rank + "nd"); return; } else if(rank % 10 == 3) { System.out.println(rank + "rd"); return; } else { System.out.println(rank + "th"); return; } } } } }