Module Module1

    Sub Main()

        Dim tmp As String() = Split(Console.ReadLine(), " ")
        Dim N As Integer = CInt(tmp(0))
        Dim M As Integer = CInt(tmp(1))
        Dim ans As Integer = kumiawase(N, 2)    ' 偶数、偶数　の場合
        ans += kumiawase(M, 2)                  ' 奇数、奇数　の場合

        Console.WriteLine(ans)

    End Sub

    Function kumiawase(a As Integer, b As Integer) As Integer

        Dim bunsi As Long = kaijyo(a)
        Dim bunbo As Long = kaijyo(b) * kaijyo(a - b)
        Dim ans As Long = bunsi \ bunbo

        Return ans

    End Function

    Function kaijyo(a As Integer) As Long

        Dim ans As Long = 1

        For i As Integer = a To 2 Step -1
            ans *= i
        Next

        Return ans

    End Function

End Module
