#include <bits/stdc++.h>
using namespace std;

int main()
{
    int N, L;
    cin>>N>>L;
    string s;
    cin.ignore();
    getline(cin,s);
    int br=0;
    int i0=s.find_first_not_of(" ");
    int i01=s.find_first_of(" ");
    int H1=stoi(s.substr(i0, i01));
    br=br+1;
    if (H1>=L){cout<<"-1"; exit(1);}
    while (br+1<N){
    i01=i01+1;
    int ipr=s.find_first_not_of(" ", i01);
    int ib=s.find_first_of(" ", i01);
    int Hi=stoi(s.substr(ipr, ib));
    i01=i01+1;
    br=br+1;
    if (Hi>=L){cout<<br; exit(2);}
    }
    
   
    return 0;
}