include[HTML_REMOVED]
using namespace std;
int main(){
int n,q;
cin>>n>>q;
int a[n];
for(int i=0;i[HTML_REMOVED]>a[i];
while(q–){
int k;
cin>>k;
int l=0,r=n-1;
while(l[HTML_REMOVED]>1;
if(a[mid][HTML_REMOVED]>1;
if(a[mid]>k) r=mid-1;
else l=mid;
}
cout<<r<<endl;
}
return 0;
}