(defn my-counter [f coll acc]
  (let [ope (fn [a k] 
              (assoc a k (f (get a k 0))))]
    (reduce ope acc coll)))

(let [n (Integer/parseInt (read-line))
      s (doall 
          (for [_ (range n)] (read-line)))
      m (Integer/parseInt (read-line))
      t (doall
          (for [_ (range m)] (read-line)))]
  (->> {}
       (my-counter inc s)
       (my-counter dec t)
       (vals)
       (cons 0)
       (apply max)
       (println)
       ))
