#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll ad[1000005],aa[1000005],bd[1000005],ba[1000005];
int dad,daa,dbd,dba;
ll dem;
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
    if(fopen("DANCING.INP","r")){
        freopen("DANCING.INP","r",stdin);
        freopen("DANCING.OUT","w",stdout);
    }
    int n;cin >> n;
    for(int i = 1;i <= n ;i++){
        int x;cin >> x;
        if(x > 0){
            dad++;
            ad[dad] = x;
        }
        else{
            daa++;
            aa[daa] = (-1)*x;
        }
    }
    for(int i = 1;i <= n ;i++){
        int x;cin >> x;
        if(x > 0){
            dbd++;
            bd[dbd] = x;
        }
        else{
            dba++;
            ba[dba] = x*(-1);
        }
    }
    sort(ad+1,ad+dad+1);sort(aa+1,aa+daa+1);
    sort(bd+1,bd+dbd+1);sort(ba+1,ba+dba+1);
    int i = 1,j = 1;
    while(i <= daa && j <= dbd){
        //aa > bd
        if(aa[i] > bd[j]){
            dem++;
            i++;
            j++;
        }
        else{
            i++;
        }
    }
    i = 1;j = 1;
    while(i <= dad && j <= dba){
        //ad < ba
        if(ad[i] < ba[j]){
            dem++;
            i++;
            j++;
        }
        else{
            j++;
        }
    }
    cout << dem;
    return 0;
}
