"use strict"

const Main = (input)=>{
const Array = input.split("\n")
const N = parseInt(Array[0],10)
const M = parseInt(Array[N+1],10)

const obj={}

for (let i=1;i<=N;i+=1){
   obj[Array[i]]= (obj[Array[i]]||0)+1
}

for(let j=N+2;j<=N+M+2;j++){
  obj[Array[j]]=(obj[Array[j]||0])-1
}

const result = 0
const keyArray = Object.keys(obj)
keyArray.forEach((ele)=>{
 result = Math.max(result,obj[ele])
})

console.log(result)

}

Main(require('fs').readFileSync('/dev/stdin', 'utf8'));

