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);
    }
}
 import java.util.Scanner; Scanner java.util 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);
    }
} 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;
    } f {
        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;
    } int sum =0; sum 0 int even =arr[0]; even arr[0] arr 0 int odd = arr[1]; odd arr[1] arr 1 for(int i=0; i<arr[0];i++)
        {
            even = even-1;
            sum = sum + even;
            
        } int i=0; int i=0; i 0 i<arr[0] i arr[0] arr 0 i++ i++ i {
            even = even-1;
            sum = sum + even;
            
        } {
            even = even-1;
            sum = sum + even;
            
        } even = even-1 even even-1 even 1 sum = sum + even sum sum + even sum even for(int i=0; i<arr[1]; i++)
        {
            odd = odd-1;
            sum = sum + odd;
            
        } int i=0; int i=0; i 0 i<arr[1] i arr[1] arr 1 i++ i++ i {
            odd = odd-1;
            sum = sum + odd;
            
        } {
            odd = odd-1;
            sum = sum + odd;
            
        } odd = odd-1 odd odd-1 odd 1 sum = sum + odd sum sum + odd sum odd return sum; sum int[] arr arr 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);
    } main {
        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);
    } Scanner keyboard = new Scanner(System.in); keyboard new Scanner(System.in) int[] arr = new int[2]; arr new int[2] 2 for(int i=0; i<2 ;i++)
        {
            arr[i] = keyboard.nextInt();
        } int i=0; int i=0; i 0 i<2 i 2 i++ i++ i {
            arr[i] = keyboard.nextInt();
        } {
            arr[i] = keyboard.nextInt();
        } arr[i] = keyboard.nextInt() arr[i] arr i keyboard.nextInt() keyboard.nextInt keyboard int pairs = 0; pairs 0 pairs = f(arr) pairs f(arr) f arr System.out.println(pairs) System.out.println System.out System System.out pairs String[] args args 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);
    }
} 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);
    }
} Main
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);
    }
}

