#include <iostream>
using namespace std;
main(){
	int N,br=1;
	cin>>N;
	long H1[N],L;
	cin>>L;
	for(int i=0;i<N;i++)
		cin>>H1[i];
	for(int i=0;i<N;i++){
		if(H1[i]>L)
			br++;
		else
			break;	
	}
	if(br==N+1)
		br=-1;
	cout<<br;
}