#include <bits/stdc++.h>
using namespace std;
int n, q, a[1005], b[1005], br=0;
bool bul;
int main () {
    cin >> n >> q;
    for (int i=1; i<=n; i++){
            cin >> a[i];
    }
    for (int i=1; i<=q; i++){
            cin >> b[i];
    }
    sort (a,a+n+1);
    if(b[1]>a[n]){
        cout<<n<<endl;
        return 0;
    }

    for (int i=1; i<=n; i++){
        if (b[1]<=a[i]){
            if(b[1]<a[i]){
                cout << abs(br-(n-br));
                break;
            }
            else{cout << abs(br-(n-i)); break;
            }
        }

        br=i;
        ///cout<<br<<" BR"<<endl;
    }
    return 0;
}