let f n = Array.(to_list @@ init n @@ fun _ -> read_line ())
let ss = f @@ read_int ()
let ts = f @@ read_int ()
let _ = List.(fold_left (fun a u -> max a @@ length (filter ((=) u) ss) - length (filter ((=) u) ts)) 0 ss) |> Printf.printf "%d\n"