import java.util.LinkedList;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        int n; // broj kamenja
        int l; // visina
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        l = in.nextInt();
        LinkedList<Integer> lista = new LinkedList<>();
        int i = 0;
        while(i < n){
            lista.add(in.nextInt());

            i += 1;
        }
        i = 0;
        int count = 0;
        while(i < lista.size()){
            if(l < lista.get(i)){
                count += 1;
            }
            else{
                break;
            }
            
            i += 1;
        }
        if(count >= n){
            count = -1;
        }
        else{
            count += 1;
        }
        System.out.println(count);
    }
    
}