(def n (Integer/parseInt (read-line)))
(def as (map #(Integer/parseInt %) 
             (clojure.string/split (read-line) #" ")))
(def bs (map #(Integer/parseInt %) 
             (clojure.string/split (read-line) #" ")))
(->>
  (for [a as b bs] (+ a b))
  (reduce bit-xor)
  (println))