import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int m = scanner.nextInt();

		int nC2 = 1;
		for(int i = n; i>n-2; i--){
			nC2 *= i;
		}
		nC2 /= 2;
		if(n < 2){
			nC2 = 0;
		}

		int mC2 = 1;
		for(int i = m; i>m-2; i--){
			mC2 *= i;
		}
		mC2 /= 2;
		if(m < 2){
			mC2 = 0;
		}
		System.out.println(nC2+mC2);

	}


} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int m = scanner.nextInt();

		int nC2 = 1;
		for(int i = n; i>n-2; i--){
			nC2 *= i;
		}
		nC2 /= 2;
		if(n < 2){
			nC2 = 0;
		}

		int mC2 = 1;
		for(int i = m; i>m-2; i--){
			mC2 *= i;
		}
		mC2 /= 2;
		if(m < 2){
			mC2 = 0;
		}
		System.out.println(nC2+mC2);

	}


} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int m = scanner.nextInt();

		int nC2 = 1;
		for(int i = n; i>n-2; i--){
			nC2 *= i;
		}
		nC2 /= 2;
		if(n < 2){
			nC2 = 0;
		}

		int mC2 = 1;
		for(int i = m; i>m-2; i--){
			mC2 *= i;
		}
		mC2 /= 2;
		if(m < 2){
			mC2 = 0;
		}
		System.out.println(nC2+mC2);

	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int m = scanner.nextInt();

		int nC2 = 1;
		for(int i = n; i>n-2; i--){
			nC2 *= i;
		}
		nC2 /= 2;
		if(n < 2){
			nC2 = 0;
		}

		int mC2 = 1;
		for(int i = m; i>m-2; i--){
			mC2 *= i;
		}
		mC2 /= 2;
		if(m < 2){
			mC2 = 0;
		}
		System.out.println(nC2+mC2);

	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int m = scanner.nextInt(); m scanner.nextInt() scanner.nextInt scanner int nC2 = 1; nC2 1 for(int i = n; i>n-2; i--){
			nC2 *= i;
		} int i = n; int i = n; i n i>n-2 i n-2 n 2 i-- i-- i {
			nC2 *= i;
		} {
			nC2 *= i;
		} nC2 *= i nC2 i nC2 /= 2 nC2 2 if(n < 2){
			nC2 = 0;
		} n < 2 n 2 {
			nC2 = 0;
		} nC2 = 0 nC2 0 int mC2 = 1; mC2 1 for(int i = m; i>m-2; i--){
			mC2 *= i;
		} int i = m; int i = m; i m i>m-2 i m-2 m 2 i-- i-- i {
			mC2 *= i;
		} {
			mC2 *= i;
		} mC2 *= i mC2 i mC2 /= 2 mC2 2 if(m < 2){
			mC2 = 0;
		} m < 2 m 2 {
			mC2 = 0;
		} mC2 = 0 mC2 0 System.out.println(nC2+mC2) System.out.println System.out System System.out nC2+mC2 nC2 mC2 String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int m = scanner.nextInt();

		int nC2 = 1;
		for(int i = n; i>n-2; i--){
			nC2 *= i;
		}
		nC2 /= 2;
		if(n < 2){
			nC2 = 0;
		}

		int mC2 = 1;
		for(int i = m; i>m-2; i--){
			mC2 *= i;
		}
		mC2 /= 2;
		if(m < 2){
			mC2 = 0;
		}
		System.out.println(nC2+mC2);

	}


} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int m = scanner.nextInt();

		int nC2 = 1;
		for(int i = n; i>n-2; i--){
			nC2 *= i;
		}
		nC2 /= 2;
		if(n < 2){
			nC2 = 0;
		}

		int mC2 = 1;
		for(int i = m; i>m-2; i--){
			mC2 *= i;
		}
		mC2 /= 2;
		if(m < 2){
			mC2 = 0;
		}
		System.out.println(nC2+mC2);

	}


} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int m = scanner.nextInt();

		int nC2 = 1;
		for(int i = n; i>n-2; i--){
			nC2 *= i;
		}
		nC2 /= 2;
		if(n < 2){
			nC2 = 0;
		}

		int mC2 = 1;
		for(int i = m; i>m-2; i--){
			mC2 *= i;
		}
		mC2 /= 2;
		if(m < 2){
			mC2 = 0;
		}
		System.out.println(nC2+mC2);

	}


}
