(defn create-data [s]
  (map #(Long/parseLong %) (.split s " ")))

(defn sum [xs]
  (reduce + xs))

(defn zipWith [xs ys]
  (map vector xs ys))

(defn candies3 [n ys1 ys2]
  (apply max
         (map sum
              (zipWith
               (reductions + ys1)
               (reductions - (sum ys2) ys2)))))

(println (candies3 (Long/parseLong (read-line)) (create-data (read-line)) (create-data (read-line))))
