#include <iostream>

using namespace std;

int main()
{
    int n, l, visine;
    int brojac = 0;

    cin >> n >> l;

    for (int i = 0; i < n; ++i){
       cin >> visine;
       if (l < visine){
          brojac++;
       } else{
          break;
       }
    }

    if ((brojac+1) >= n){
      cout << -1 << endl;
    } else{
      cout << brojac+1 << endl;
    }

    return 0;
}