#include <iostream>

using namespace std;

long long nadjiMin(long long a[], int n){
    long long min = 10000000000;
    for (int i = 0; i < n; i++){
        if (a[i] < min)
            min = a[i];
    }

    return min;
}

int binarnaPretraga(long long arr[], int low, int high, int x)
{
    while (low <= high) {
        int mid = low + (high - low) / 2;

        if (arr[mid] == x)
            return mid;

        if (arr[mid] < x)
            low = mid + 1;

        else
            high = mid - 1;
    }

    return -1;
}

int main()
{
    int n;
    long long l;
    cin >> n >> l;

    long long h[n];
    for (int i = 0; i < n; i++)
        cin >> h[i];

    int minH = nadjiMin(h, n);

    int rez;

    if (minH > l){
        rez = -1;
        cout << rez;
        return 0;
    }

    else {
        int bp = binarnaPretraga(h, 0, n-1, l);
        if (h[bp] == l){
            rez = bp+1;
        }

        else {
            for (int i = 0; i < n; i++){
                if (h[i] <= l){
                    rez = i+1;
                    break;
                }
            }
        }

        cout << rez;
    }

    return 0;
}