/*#include<stdio.h>
int d[10000001]={},q,m,n;
int bs(int s, int e, int k)
{
int mid=(s+e)/2;
if(s>e) return -1;
if(d[mid]==k) return mid+1;
else if(d[mid]<k) bs(mid+1,e,k);
else bs(s,mid-1,k);
}
int main()
{
int i;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&d[i]);
}
scanf("%d",&m);
for(i=0;i<m;i++)
{
scanf("%d",&q);
printf("%d ",bs(0,n-1,q));
}
return 0;
}
#include<stdio.h>
int a[500001]={},b[500001]={},n,i,d,m;
int bs(int s, int e, int k)
{
int mid=(s+e)/2;
if(s>e) return -1;
if(a[mid]==k) return mid-1;
else if(a[mid]<k) bs(mid+1,e,k);
else bs(s,mid-1,k);
}
void swap(int x, int y)
{
int t=a[x];
a[x]=a[y];
a[y]=t;
}
void quick_sort(int s, int e)
{
int pivot=s, left=s, right=e+1;
if(s>=e) return ;
do
{
do{ left++;}while(a[pivot]>a[left]);
do{ right--;}while(a[pivot]<a[right]);
if(left<right) swap(left,right);
}while(left<right);
swap(pivot,right);
quick_sort(s,right-1);
quick_sort(right+1,e);
}
int main()
{
scanf("%d",&n);
for(i=1;i<=n;i++)
{
scanf("%d",&a[i]);
b[i]=a[i];
}
quick_sort(1,n);
for(i=1;i<=n;i++)
{
printf("%d ",bs(1,n,b[i]));
}
return 0;
}*/
#include<stdio.h>
int d[10000001]={},m,n,b;
int bs(int s, int e, int k)
{
int mid=(s+e)/2;
if(s>e) return -1;
if(d[mid]>=k) bs(s,mid,k);
else bs(mid+1,e,k);
}
int main()
{
//1 1 1 1 1
int i;
scanf("%d %d",&n,&b);
for(i=0;i<n;i++)
{
scanf("%d",&d[i]);
}
if(d[n-1]>b)
{
printf("%d",n+1);
}
else
{
printf("%d",bs(0,n-1,b));
}
return 0;
}