Imports System.Text

Module Module1

    Sub Main()
        Dim ans As String = ""

        Dim getvaluelength As Integer


        Dim mojiretu As String = Console.ReadLine()

        Dim guusuu As Integer = CInt(mojiretu.Split(" "c)(0))
        Dim kisuu As Integer = CInt(mojiretu.Split(" "c)(1))

        ans = (((guusuu * (guusuu - 1)) / 2) + ((kisuu * (kisuu - 1)) / 2)).ToString

        Console.WriteLine(ans)
        Console.ReadKey()





    End Sub




End Module