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

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    long long n, l;
    cin >> n >> l;
    vector<pair<long long, int>> a(n);
    for(int i = 0; i < n; i++){
        long long x;
        cin >> x;
        a[i] = make_pair(x, i);
    }
    sort(a.begin(), a.end());
    if(a[0].first > l && a[n-1].first > l){
        cout << "-1\n";
        return 0;
    }
    int levo = 0;
    int desno = n;
    while(levo < desno){
        int mid = levo + (desno-levo) / 2;
        if(a[mid].first < l){
            levo = mid + 1;
        }else{
            desno = mid;
        }
    }
    if(a[levo].first == l)
        cout << a[levo].second+1 << endl;
    else
        cout << a[levo-1].second+1 << endl;
    return 0;
}