#Resale
N = gets.chomp.to_i
V = gets.chomp.split(" ").map(&:to_i)
C = gets.chomp.split(" ").map(&:to_i)
X = []
X.push(0)
sum_x = 0
Y = []
Y.push(0)
sum_y = 0
max_ans = 0
for i in 0..V.length-1 do
    X.push(V[i])
    sum_x = sum_x + V[i]
    for j in 1..V.length-1 do
        if i+1 <= j
            X.push(V[i]+V[j])
        end
    end
end
X.push(sum_x)

for i in 0..C.length-1 do
    Y.push(C[i])
    sum_y = sum_y + C[i]
    for j in 1..C.length-1 do
        if i+1 <= j
            Y.push(C[i]+C[j])
        end
    end
end
Y.push(sum_y)

for i in 0..Y.length-1 do
    if max_ans < X[i] - Y[i]
        max_ans = X[i] - Y[i]
    end
end
puts max_ans