#include<iostream>
#include<fstream>
#include<algorithm>
using namespace std;
int main()
{
ifstream fin("horsea.in");
ofstream fout("horsea.out");
int t[5001]={0},l[5001]={0};
int n=0,sum=-1;
fin>>n;
for (int i=1;i<=n;i++)
fin>>l[i];
for (int i=1;i<=n;i++)
fin>>t[i];
sort(l+1,l+n);
sort(t+1,t+n);
for (int i=1;i<=n-1;i++)
t[i]=t[i+1];
n--;
for (int i=1;i<=n;i++)
if (t[i]>l[i])
sum++;
else
if (t[i]<l[i])
sum--;
fout<<sum;
fin.close();
fout.close();
return 0;
}