import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = Integer.parseInt(in.next());
		int m = Integer.parseInt(in.next());
		int all = (n + m) * (m + n - 1) / 2;
		int odd = n * m;
		int even = all - odd;
		
		System.out.println(even);
	}
}	 import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = Integer.parseInt(in.next());
		int m = Integer.parseInt(in.next());
		int all = (n + m) * (m + n - 1) / 2;
		int odd = n * m;
		int even = all - odd;
		
		System.out.println(even);
	}
} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = Integer.parseInt(in.next());
		int m = Integer.parseInt(in.next());
		int all = (n + m) * (m + n - 1) / 2;
		int odd = n * m;
		int even = all - odd;
		
		System.out.println(even);
	} main {
		Scanner in = new Scanner(System.in);
		int n = Integer.parseInt(in.next());
		int m = Integer.parseInt(in.next());
		int all = (n + m) * (m + n - 1) / 2;
		int odd = n * m;
		int even = all - odd;
		
		System.out.println(even);
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int n = Integer.parseInt(in.next()); n Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in int m = Integer.parseInt(in.next()); m Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in int all = (n + m) * (m + n - 1) / 2; all (n + m) * (m + n - 1) / 2 (n + m) * (m + n - 1) (n + m) n m (m + n - 1) m + n m n 1 2 int odd = n * m; odd n * m n m int even = all - odd; even all - odd all odd System.out.println(even) System.out.println System.out System System.out even String[] args args public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = Integer.parseInt(in.next());
		int m = Integer.parseInt(in.next());
		int all = (n + m) * (m + n - 1) / 2;
		int odd = n * m;
		int even = all - odd;
		
		System.out.println(even);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = Integer.parseInt(in.next());
		int m = Integer.parseInt(in.next());
		int all = (n + m) * (m + n - 1) / 2;
		int odd = n * m;
		int even = all - odd;
		
		System.out.println(even);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = Integer.parseInt(in.next());
		int m = Integer.parseInt(in.next());
		int all = (n + m) * (m + n - 1) / 2;
		int odd = n * m;
		int even = all - odd;
		
		System.out.println(even);
	}
}	