import java.util.*;
public class Main {
    public static void main(String[] args){
      	int count=0;
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
      	int m = Integer.parseInt(sc.next());
      
      	//全通りを算出
      	int totalConbination=(n+m)*(n+m-1)/2;
      	
      	//奇数となる組み合わせ=偶数+奇数の組み合わせ
      	int oddConbination=n*m;
      
      	System.out.println(totalConbination-oddConbination);
      
      
    }

} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
      	int count=0;
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
      	int m = Integer.parseInt(sc.next());
      
      	//全通りを算出
      	int totalConbination=(n+m)*(n+m-1)/2;
      	
      	//奇数となる組み合わせ=偶数+奇数の組み合わせ
      	int oddConbination=n*m;
      
      	System.out.println(totalConbination-oddConbination);
      
      
    }

} Main public static void main(String[] args){
      	int count=0;
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
      	int m = Integer.parseInt(sc.next());
      
      	//全通りを算出
      	int totalConbination=(n+m)*(n+m-1)/2;
      	
      	//奇数となる組み合わせ=偶数+奇数の組み合わせ
      	int oddConbination=n*m;
      
      	System.out.println(totalConbination-oddConbination);
      
      
    } main {
      	int count=0;
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
      	int m = Integer.parseInt(sc.next());
      
      	//全通りを算出
      	int totalConbination=(n+m)*(n+m-1)/2;
      	
      	//奇数となる組み合わせ=偶数+奇数の組み合わせ
      	int oddConbination=n*m;
      
      	System.out.println(totalConbination-oddConbination);
      
      
    } int count=0; count 0 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int m = Integer.parseInt(sc.next()); m Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int totalConbination=(n+m)*(n+m-1)/2; totalConbination (n+m)*(n+m-1)/2 (n+m)*(n+m-1) (n+m) n m (n+m-1) n+m n m 1 2 int oddConbination=n*m; oddConbination n*m n m System.out.println(totalConbination-oddConbination) System.out.println System.out System System.out totalConbination-oddConbination totalConbination oddConbination String[] args args public class Main {
    public static void main(String[] args){
      	int count=0;
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
      	int m = Integer.parseInt(sc.next());
      
      	//全通りを算出
      	int totalConbination=(n+m)*(n+m-1)/2;
      	
      	//奇数となる組み合わせ=偶数+奇数の組み合わせ
      	int oddConbination=n*m;
      
      	System.out.println(totalConbination-oddConbination);
      
      
    }

} public class Main {
    public static void main(String[] args){
      	int count=0;
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
      	int m = Integer.parseInt(sc.next());
      
      	//全通りを算出
      	int totalConbination=(n+m)*(n+m-1)/2;
      	
      	//奇数となる組み合わせ=偶数+奇数の組み合わせ
      	int oddConbination=n*m;
      
      	System.out.println(totalConbination-oddConbination);
      
      
    }

} Main
import java.util.*;
public class Main {
    public static void main(String[] args){
      	int count=0;
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
      	int m = Integer.parseInt(sc.next());
      
      	//全通りを算出
      	int totalConbination=(n+m)*(n+m-1)/2;
      	
      	//奇数となる組み合わせ=偶数+奇数の組み合わせ
      	int oddConbination=n*m;
      
      	System.out.println(totalConbination-oddConbination);
      
      
    }

}