Module Module1
    Sub main()
        Dim user2 As List(Of String) = New List(Of String)(Split(Console.ReadLine(), " "))

        Dim total(2) As Long

        For i = 1 To CLng(user2(0)) - 1
            total(0) += i
        Next
        For i = 1 To CLng(user2(1)) - 1
            total(1) += i
        Next

        Console.WriteLine(total.Sum)
        MsgBox("")
    End Sub
end module