Module Module1
    Dim ary( , ), ary1, ary2, str1, str2
    Dim i, j, j0, k, sm, sm1, myRw, myCl, myCl0 As Integer

    Sub Main()
        myCl0 = 2
'        j0 = 4
'        j0 = InputBox("j0")
        j0 = Console.ReadLine
        
        ReDim ary(1, j0 - 1)
        
'        str1 = InputBox("str1")
        str1 = Console.ReadLine
        ary1 = Split(str1)
'        str2 = InputBox("str2")
        str2 = Console.ReadLine
        ary2 = Split(str2)
        
        For j = 0 To j0 - 1
            ary(0, j) = Int(ary1(j))
            ary(1, j) = Int(ary2(j))
        Next

'        Randomize
        For i = 0 To 1
            For j = 0 To j0 - 1
'                ary(i, j) = Int(9 * Rnd + 1)
'                Cells(i + 1, j + 1 + myCl0) = ary(i, j)
            Next j
        Next i

        sm = 0
        myRw = 4
        For k = j0 - 1 To 0 Step -1
            sm1 = 0
            
            myCl = myCl0
            For j = 0 To j0 - 1
                If j <= k Then
                    sm1 = sm1 + ary(0, j)
'                    Cells(myRw, j + 1 + myCl) = ary(0, j)
                End If
                If j = k Then myCl = myCl + 1
                If j >= k Then
                    sm1 = sm1 + ary(1, j)
'                    Cells(myRw, j + 1 + myCl) = ary(1, j)
                End If
            Next j
            
 '           Cells(myRw, 1) = sm1
            
            If sm < sm1 Then sm = sm1
            myRw = myRw + 1
        Next k
    
'        MsgBox sm
        Console.WriteLine(sm)
    End Sub
End Module