main :: IO ()
main = do
  getLine
  a1 <- map read . words <$> getLine
  a2 <- map read . words <$> getLine
  let
    po = sum $ init a2
    a = zip (tail a1) (init a2)
    sums = scanl1 (\(x1, y1) (x2, y2) -> (x1 + x2, y1 + y2)) a
    ans = foldl (\x (y, z) -> (y + po - z) : x) [] sums
  print $ head a1 + last a2 + if null ans then 0 else maximum (po:ans)