#include <bits/stdc++.h>
#define task "DANCING"
#define Yin ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define xD if (fopen(task".INP", "r")){freopen(task".INP", "r", stdin);freopen(task".OUT", "w", stdout);}
#define f  first
#define s second

using namespace std;

vector<int> tc,tt,gc,gt;
int n;
int cnt = 0;
int main()
{
    Yin xD
    cin >> n;
    for(int i = 1;i <= n;i += 1)
    {
        int x;cin >> x;
        if(x > 0)
            tc.push_back(x);
        else tt.push_back(-x);
    }
    for(int i = 1;i <= n;i += 1)
    {
        int x;cin >> x;
        if(x > 0)
            gc.push_back(x);
        else gt.push_back(-x);
    }
    sort(gt.begin(),gt.end());
    sort(gc.begin(),gc.end());
    sort(tt.begin(),tt.end());
    sort(tc.begin(),tc.end());
    int x = -1;
    for(auto i : tc)
    {
        x = upper_bound(gt.begin() + x + 1,gt.end(),i) - gt.begin();
        if(x < gt.size())
            cnt += 1;
        else break;
    }
    x = -1;
    for(auto i : gc)
    {
        x = upper_bound(tt.begin() + x + 1,tt.end(),i) - tt.begin();
        if(x < tt.size())
            cnt += 1;
        else break;
    }
    cout << cnt;
    return 0;
}
