#include <iostream>

using namespace std;

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

    }
    return 0;
}