let N = Int(readLine()!)!

var A = [[Int]]()
for _ in stride(from: 0, to: 2, by: 1) {
    let row = readLine()!.split(separator: " ").map { Int($0)! }
    A.append(row)
}

var dp = Array(repeating: Array(repeating: 0, count: N), count: 2)
for j in stride(from: 0, to: N, by: 1) {
    for i in stride(from: 0, to: 2, by: 1) {
        switch (i == 0, j == 0) {
        case (true, true):
            dp[0][0] = A[0][0]
        case (false, true):
            dp[1][0] = dp[0][0] + A[1][0]
        case (true, false):
            dp[0][j] = dp[0][j - 1] + A[0][j]
        case (false, false):
            dp[1][j] = max(dp[0][j], dp[1][j - 1]) + A[1][j]
        }
    }
}

print(dp.last!.last!)
