function Main(input){
  var arr = input.split('\n');
  arr.pop();
  var b={};
  var r={};
  for(var i=1;i<arr.length;i++){
    if(i<=Number(arr[0])){
      if(isNaN(b[arr[i]])){
        b[arr[i]]=1;
      }else{
        b[arr[i]]+=1;
      }
    }else if(i>Number(arr[0])+1){
      if(isNaN(r[arr[i]])){
        r[arr[i]]=1;
      }else{
        r[arr[i]]+=1;
      }
    }
  }
  for(var i in r){
    if(!isNaN(b[i])){
      b[i]-=r[i];
    }
  }
  var maxv=0;
  for(var i of Object.keys(b)){
    if(b[i]>maxv){
      maxv=b[i];
    }
  }
  console.log(maxv);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));