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