#include<bits/stdc++.h> using namespace std; int main() { int n,m; cin>>n>>m; int number[1000]; for(int i=1;i<=n;i++) { cin>>number[i]; } int l=1; int r=n; int ans; while(l<=r) { int mid=(l+r)/2; if(number[mid]<=m) { ans=mid; l=mid+1; } else r=mid-1; } cout<<ans<<endl; return 0; }