#include<bits/stdc++.h>
using namespace std;
int a[2000];
int tinh(int a[],int k,int left,int right)
{
	if(left>right)	return -1;
	int mid=(left+right)/2;
	if(a[mid]==k)  return mid;
	else if(a[mid]>k)	return tinh(a,k,left,mid-1);
	else if(a[mid]<k)  return tinh(a,k,mid+1,right);

}
int main()
{
	ifstream f1("TKNP.inp");
	ofstream f2("TKNP.out");
	int n,k;
	f1>>n>>k;
	for(int i=1;i<=n;i++)	f1>>a[i];
	int tg = tinh(a,k,1,n);
	f2<<tg;
	
}
