Module Module1

    Sub Main()

        Dim n As Integer
        n = Console.ReadLine
        Dim a(1, n - 1) As Integer

        For k As Integer = 0 To 1
            For l As Integer = 0 To (n - 1)
                a(k, l) = Console.ReadLine
            Next
        Next

        Dim n1, n2, sum, lsum As Integer
        'sum is the sum of the selected rows and columns 
        'lsum is the largest sum of the sum 

        For i As Integer = 0 To (n - 1)
            For j As Integer = 0 To n
                sum = sum + a(n1, n2)
                If sum > lsum Then
                    lsum = sum
                End If
                If i = j Then
                    n1 = n1 + 1
                Else
                    n2 = n2 + 1
                End If

            Next
            n1 = 0
            n2 = 0
            sum = 0

        Next
        Console.WriteLine(lsum)

    End Sub

End Module
