#include<iostream>
#include<algorithm>
using namespace std;

int main(){
    int n,q;
    int br;
    int b;
    int j;
    int dn;
    cin >> n >> q;
    int a[n];
    for (int i=0;i<n;i++){cin>>a[i];}
    sort(a, a + n);
    for (int i=0;i<q;i++){
        cin>>b;
        j=lower_bound(a,a+n,b);
        dn=2*j-n;
        cout << dn << "\n";
    }
    return 0;

}