import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();

        if (n == 0) {
            System.out.println((m * m - m) / 2);
        }else if(m == 0){
            System.out.println((n * n - n) / 2);
        }else {
            int resultn = ((n * n - n) / 2);
            int resultm = ((m * m - m) / 2);
            System.out.println(resultm + resultn);
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();

        if (n == 0) {
            System.out.println((m * m - m) / 2);
        }else if(m == 0){
            System.out.println((n * n - n) / 2);
        }else {
            int resultn = ((n * n - n) / 2);
            int resultm = ((m * m - m) / 2);
            System.out.println(resultm + resultn);
        }
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();

        if (n == 0) {
            System.out.println((m * m - m) / 2);
        }else if(m == 0){
            System.out.println((n * n - n) / 2);
        }else {
            int resultn = ((n * n - n) / 2);
            int resultm = ((m * m - m) / 2);
            System.out.println(resultm + resultn);
        }
    } main {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();

        if (n == 0) {
            System.out.println((m * m - m) / 2);
        }else if(m == 0){
            System.out.println((n * n - n) / 2);
        }else {
            int resultn = ((n * n - n) / 2);
            int resultm = ((m * m - m) / 2);
            System.out.println(resultm + resultn);
        }
    } 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 if (n == 0) {
            System.out.println((m * m - m) / 2);
        }else if(m == 0){
            System.out.println((n * n - n) / 2);
        }else {
            int resultn = ((n * n - n) / 2);
            int resultm = ((m * m - m) / 2);
            System.out.println(resultm + resultn);
        } n == 0 n 0 {
            System.out.println((m * m - m) / 2);
        } System.out.println((m * m - m) / 2) System.out.println System.out System System.out (m * m - m) / 2 (m * m - m) m * m m m m 2 if(m == 0){
            System.out.println((n * n - n) / 2);
        }else {
            int resultn = ((n * n - n) / 2);
            int resultm = ((m * m - m) / 2);
            System.out.println(resultm + resultn);
        } m == 0 m 0 {
            System.out.println((n * n - n) / 2);
        } System.out.println((n * n - n) / 2) System.out.println System.out System System.out (n * n - n) / 2 (n * n - n) n * n n n n 2 {
            int resultn = ((n * n - n) / 2);
            int resultm = ((m * m - m) / 2);
            System.out.println(resultm + resultn);
        } int resultn = ((n * n - n) / 2); resultn ((n * n - n) / 2) (n * n - n) n * n n n n 2 int resultm = ((m * m - m) / 2); resultm ((m * m - m) / 2) (m * m - m) m * m m m m 2 System.out.println(resultm + resultn) System.out.println System.out System System.out resultm + resultn resultm resultn String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();

        if (n == 0) {
            System.out.println((m * m - m) / 2);
        }else if(m == 0){
            System.out.println((n * n - n) / 2);
        }else {
            int resultn = ((n * n - n) / 2);
            int resultm = ((m * m - m) / 2);
            System.out.println(resultm + resultn);
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();

        if (n == 0) {
            System.out.println((m * m - m) / 2);
        }else if(m == 0){
            System.out.println((n * n - n) / 2);
        }else {
            int resultn = ((n * n - n) / 2);
            int resultm = ((m * m - m) / 2);
            System.out.println(resultm + resultn);
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();

        if (n == 0) {
            System.out.println((m * m - m) / 2);
        }else if(m == 0){
            System.out.println((n * n - n) / 2);
        }else {
            int resultn = ((n * n - n) / 2);
            int resultm = ((m * m - m) / 2);
            System.out.println(resultm + resultn);
        }
    }
}