#include <iostream>

using namespace std;

int main()
{
    int N, L, br=0, br2=1;
    cin>>N>>L;
    int H[N];
    for(int i=0; i<N; i++){
        cin>>H[i];
        if(H[i]<L){
            br=i+1;
        }
        else{
            br2++;
        }
        if(br2>N){
            cout<<"-1"<<endl;
        }
    }
    if(br2<=N){
        cout<<br<<endl;
    }
    return 0;
}