/*
#include <stdio.h>
char stack[100001]={};
char stack[n];
char* stack = (char*)malloc(sizeof(char)*n);
char stack[n][m];
char** stack = (char**)malloc(sizeof(char*)*n);
for(int i=0;i<m;i++)
{
stack[i] = (char*)malloc(sizeof(char)*m);
}
int top =-1;
void push(char* data)
{
stack[++top]=data;
}
char pop()
{
if(top==-1)return ' ';
return stack[top--];
}
int main()
{
int arr[30][30];
int cnt=0,line=0;;
char n[100001];
scanf("%s",n);
push(arr[][0]);
for(int i=0;n[i]!=0;i++){
if(n[i]=='('){
push(n[i]);
line++;
}
else if(n[i-1]=='('&&n[i]==')'){
pop();
line--;
cnt+=line;
}
else{
line--;
cnt++;
pop();
}
}
printf("%d",cnt);
}
*/
//2016
/*
#include<stdio.h>
char stack[201]={};
int top=-1;
void push(char data)
{
stack[++top]=data;
}
char pop()
{
if(top==-1)return -1;
return stack[top--];
}
int main()
{
int n,i,c=1;
char num[201]={0};
scanf("%d",&n);
scanf("%s",num);
for(i=n-1;i>=0;i--){
if(c==3&&i!=0){
c=0;
push(num[i]);
push(',');
}
else push(num[i]);
c++;
}
for(i=0;top!=-1;i++)
{
printf("%c",pop());
}
return 0;
}
*/
/*
#include<stdio.h>
char stack1[101]={};
char stack2[101]={};
char stack3[101]={};
int top1=-1;
int top2=-1;
int top3=-1;
void push1(char data)
{
stack1[++top1]=data;
}
char pop1()
{
if(top1==-1)return '0';
return stack1[top1--];
}
void push2(char data)
{
stack2[++top2]=data;
}
char pop2()
{
if(top2==-1)return '0';
return stack2[top2--];
}
void push3(char data)
{
stack3[++top3]=data;
}
char pop3()
{
if(top3==-1)return -1;
return stack3[top3--];
}
int main()
{
int n,i,c=0;
char num1[101]={0};
char num2[101]={0};
scanf("%s",num1);
scanf("%s",num2);
for(i=0;num1[i]!='\0';i++)
push1(num1[i]);
for(i=0;num2[i]!='\0';i++)
push2(num2[i]);
for(i=0;top2!=-1||top1!=-1;i++){
c+=pop1()+pop2()-'0'-'0';
printf("%d %d\n",i,c);
push3(c%10+'0');
if(c/10==1&&top1==-1&&top2==-1) push3('1');
c/=10;
}
for(i=0;top3!=-1;i++){
printf("%c",pop3());
}
return 0;
}
*/
//3102
/*
#include <stdio.h>
int stack[201];
int top=-1;
void push(int data)
{
stack[++top]=data;
}
int pop()
{
if(top==-1)return-1;
return stack[top--];
}
void topf()
{
if(top==-1) printf("-1\n");
else printf("%d\n",stack[top]);
}
void size()
{
printf("%d\n",top+1);
}
void empty()
{
if(top==-1) printf("true\n");
else printf("false\n");
}
int main()
{
int n,i,j,k=0;
char a[50]={};
scanf("%d",&n);
getchar();
for(i=0;i<n;i++){
//scanf("%[^\n]s",a);
gets(a);
if(a[0]=='t') topf();
else if(a[0]=='s') size();
else if(a[0]=='e') empty();
else if(a[1]=='u'){
k=0;
for(j=6;a[j]!=' ';j++) k=k*10+a[j]-'0';
push(k);
}
else if(a[1]=='o') pop();
}
return 0;
}
*/
/*
#include <stdio.h>
int a[1000001]={};
void swap(int x, int y)
{
int t=a[x];
a[x]=a[y];
a[y]=t;
}
void qs(int s, int e)
{
int pivot=s;
int left=s,right=e;
if(s>=e) return ;
while(left<right)
{
while(a[pivot]>a[left]) left++;
while(a[pivot]<a[right]) right--;
if(left<right) swap(left,right);
}
swap(pivot,right);
qs(s,right-1);
qs(right+1,e);
}
int main()
{
int n,i;
for(i=0;i<n;i++) scanf("%d",&a[i]);
qs(0,n-1);
for(i=0;i<n;i++) printf("%d ",a[i]);
}
/*
#include <stdio.h>
int a[1000000]={};
void swap(int x,int y)
{
int t=a[x];
a[x]=a[y];
a[y]=t;
}
void quickSort(int s, int e)
{
if(s>=e) return;
int left=s,right=e+1,pivot=s;
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);
quickSort(s,right-1);
quickSort(right+1,e);
}
int main()
{
int n,i;
scanf("%d",&n);
for(i=0;i<n;i++)scanf("%d",&a[i]);
quickSort(0,n-1);
for(i=0;i<n;i++)printf("%d\n",a[i]);
return 0;
}
*/
/*
#include<stdio.h>
int a[5000];
//binary_search
//정렬이 되어있는 배열에서
//어떤 값을 찾을때 사용
//3002
//2633
int bs(int s, int e, int k)
{
int mid=(s+e)/2;
if(s>e) return -1;
if(a[mid]==k) return mid;
else if(a[mid]>k) bs(s,mid-1,k);
else bs(mid+1,e,k);
}
int main()
{
int n,i;
scanf("%d",&n);
for(i=0;i<n;i++)scanf("%d",&a[i]);
printf("%d\n",bs(0,n-1,2));
return 0;
}*/
/*
#include<stdio.h>
int a[1000000]={0};
int binary_search(int s,int e,int k)
{
int mid=(s+e)/2;
if(s>e) return -1;
if(a[mid]==k) return mid;
if(a[mid]>k)binary_search(s,mid-1,k);
else binary_search(mid+1,e,k);
}
int main()
{
int n,m,i,b[1000000]={0};
scanf("%d", &n);
for(i=1;i<=n;i++)scanf("%d",&a[i]);
scanf("%d", &m);
for(i=1;i<=m;i++)scanf("%d",&b[i]);
for(i=1;i<=m;i++)printf("%d ",binary_search(1,n,b[i]));
return 0;
}
*/
//2633
#include <stdio.h>
int a[100001]={},n;
int bs(int s, int e,int k)
{
/* int mid=(s+e)/2;
if(s>e) return -1;
if(a[mid]==k) return mid;
if(a[mid]>k) bs(s,mid-1,k);
else bs(mid+1,e,k);
*/
int mid=(s+e)/2;
if(s>e) return n+1;
else if(s==e) {
if(a[s]>=k) return s;
else return n+1;
}
if(a[mid]>=k) bs(s,mid,k);
else bs(mid+1,e,k);
}
int main()
{
int k,i;
scanf("%d %d", &n, &k);
for(i=1;i<=n;i++)scanf("%d",&a[i]);
printf("%d",bs(1,n,k));
return 0;
}
/*
int mid=(s+e)/2;
if(s>e) return -1;
if(a[mid]>=k){
e=mid;
do{
e--;
}while(a[e]>=k);
return e+1;
}
else if(a[mid]<k) bs(mid+1,e,k);
*/