Imports System.Console
Imports System.Math  
Module Program
 	Sub Main()
	    Dim N As Integer = Console.ReadLine()
        Console.Error.WriteLine(N)
        
'	    Dim A(2,N) As Integer
	    Dim A(,) As Integer = New Integer(2,N) {}
        For i As Integer = 0 To 1
            Dim tmp As String() = Console.ReadLine().Split(" ")
            Console.Error.WriteLine(tmp(0))
            For j As Integer = 0 To N-1
                A(i,j) = tmp(j)
                Console.Error.WriteLine(A(i,j))
            Next
        Next

	    Dim cumsum(,) As Integer = New Integer(2,N) {}
        For i As Integer = 0 To 1
            For j As Integer = 0 To N-1
                Dim c As Integer = 0
                If j-1>=0 Then
                    c = cumsum(i,j-1)
                End If
'                cumsum(i,j) = A(i,j) + IIF(j-1>=0, cumsum(i,j-1), 0)
                cumsum(i,j) = A(i,j) + c
            Next
        Next

        Dim max As Integer = 0
        For j As Integer = 0 To N-1
            Dim row0 As Integer = cumsum(0,j)
            Dim r As Integer = 0
            If j-1>=0 Then
                r = cumsum(1,j-1)
            End If
            Dim row1 As Integer = cumsum(1,N - 1) - r
            max = Math.Max(max, row0 + row1)
        Next
        Console.WriteLine(max)
    End Sub
End Module
