Option Strict On

Module Module1
    Const n As Int32 = 4
    Dim A, B, C, D, tmp(n - 1) As Long

    Sub Main()
        For i As Int32 = 0 To n - 1
            tmp(i) = CLng(Console.ReadLine())
        Next

        'let'
        A = tmp(0) : B = tmp(1) : C = tmp(2) : D = tmp(3)

        Console.WriteLine(Math.Min(A, B) + Math.Min(C, D))

    End Sub
End Module