import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int L = scanner.nextInt();

        int[] H = new int[N];


        for (int i = 0; i < N; i++) {
            H[i] = scanner.nextInt();
        }

        for (int i = 0; i < N; i++){
            if(L >= H[i]){
                System.out.println(i+1);
                break;
            }
            if(L < H[N-1] && H[i] == H[N-1]){
                System.out.println("-1");
                break;
            }
        }

    }
}