function main(input) {
    var N = input[0]-0;
    var bmap = {};
    for(var i=1;i<=N;i++){
        bmap[input[i]] = (bmap[input[i]]||0)+1 ;
    }
    var M = input[N+1]-0;
    for(var i=N+2;i<N+2+M;i++){
        bmap[input[i]] = (bmap[input[i]]||0)-1 ;
    }
    var ans = 0;
    Object.keys(bmap).forEach(key=>{
        ans = Math.max(ans, bmap[key]);
    })
    console.log(ans);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"))
