import java.util.Scanner;

public class Main
{
    public static int f(int[] arr)
    {
        int sum =0;
        int even =arr[0];
        int odd = arr[1];
        for(int i=0; i<arr[0];i++)
        {
            even = even-1;
            sum = sum + even;
            
        }
        for(int i=0; i<arr[1]; i++)
        {
            odd = odd-1;
            sum = sum + odd;
            
        }
        return sum;
    }
    public static void main(String[] args)
    {
        Scanner keyboard = new Scanner(System.in);
        int[] arr = new int[2];
        for(int i=0; i<2 ;i++)
        {
            arr[i] = keyboard.nextInt();
        }
        int pairs = 0;
        pairs = f(arr);
        System.out.println(pairs);
    }
}


/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz