import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long[][] comb = new long[101][101];
        for (int i = 0; i <= 100; i++) {
            for (int j = 0; j <= i; j++) {
                if (j == 0 || j == i) {
                    comb[i][j] = 1;
                } else {
                    comb[i][j] = comb[i - 1][j - 1] + comb[i - 1][j];
                }
            }
        }
        int n = sc.nextInt();
        int m = sc.nextInt();
        int ans = 0;
        System.out.println(comb[n][2] + comb[m][2]);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long[][] comb = new long[101][101];
        for (int i = 0; i <= 100; i++) {
            for (int j = 0; j <= i; j++) {
                if (j == 0 || j == i) {
                    comb[i][j] = 1;
                } else {
                    comb[i][j] = comb[i - 1][j - 1] + comb[i - 1][j];
                }
            }
        }
        int n = sc.nextInt();
        int m = sc.nextInt();
        int ans = 0;
        System.out.println(comb[n][2] + comb[m][2]);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long[][] comb = new long[101][101];
        for (int i = 0; i <= 100; i++) {
            for (int j = 0; j <= i; j++) {
                if (j == 0 || j == i) {
                    comb[i][j] = 1;
                } else {
                    comb[i][j] = comb[i - 1][j - 1] + comb[i - 1][j];
                }
            }
        }
        int n = sc.nextInt();
        int m = sc.nextInt();
        int ans = 0;
        System.out.println(comb[n][2] + comb[m][2]);
    } main {
        Scanner sc = new Scanner(System.in);
        long[][] comb = new long[101][101];
        for (int i = 0; i <= 100; i++) {
            for (int j = 0; j <= i; j++) {
                if (j == 0 || j == i) {
                    comb[i][j] = 1;
                } else {
                    comb[i][j] = comb[i - 1][j - 1] + comb[i - 1][j];
                }
            }
        }
        int n = sc.nextInt();
        int m = sc.nextInt();
        int ans = 0;
        System.out.println(comb[n][2] + comb[m][2]);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long[][] comb = new long[101][101]; comb new long[101][101] 101 101 for (int i = 0; i <= 100; i++) {
            for (int j = 0; j <= i; j++) {
                if (j == 0 || j == i) {
                    comb[i][j] = 1;
                } else {
                    comb[i][j] = comb[i - 1][j - 1] + comb[i - 1][j];
                }
            }
        } int i = 0; int i = 0; i 0 i <= 100 i 100 i++ i++ i {
            for (int j = 0; j <= i; j++) {
                if (j == 0 || j == i) {
                    comb[i][j] = 1;
                } else {
                    comb[i][j] = comb[i - 1][j - 1] + comb[i - 1][j];
                }
            }
        } {
            for (int j = 0; j <= i; j++) {
                if (j == 0 || j == i) {
                    comb[i][j] = 1;
                } else {
                    comb[i][j] = comb[i - 1][j - 1] + comb[i - 1][j];
                }
            }
        } for (int j = 0; j <= i; j++) {
                if (j == 0 || j == i) {
                    comb[i][j] = 1;
                } else {
                    comb[i][j] = comb[i - 1][j - 1] + comb[i - 1][j];
                }
            } int j = 0; int j = 0; j 0 j <= i j i j++ j++ j {
                if (j == 0 || j == i) {
                    comb[i][j] = 1;
                } else {
                    comb[i][j] = comb[i - 1][j - 1] + comb[i - 1][j];
                }
            } {
                if (j == 0 || j == i) {
                    comb[i][j] = 1;
                } else {
                    comb[i][j] = comb[i - 1][j - 1] + comb[i - 1][j];
                }
            } if (j == 0 || j == i) {
                    comb[i][j] = 1;
                } else {
                    comb[i][j] = comb[i - 1][j - 1] + comb[i - 1][j];
                } j == 0 || j == i j == 0 j 0 j == i j i {
                    comb[i][j] = 1;
                } comb[i][j] = 1 comb[i][j] comb[i] comb i j 1 {
                    comb[i][j] = comb[i - 1][j - 1] + comb[i - 1][j];
                } comb[i][j] = comb[i - 1][j - 1] + comb[i - 1][j] comb[i][j] comb[i] comb i j comb[i - 1][j - 1] + comb[i - 1][j] comb[i - 1][j - 1] comb[i - 1] comb i - 1 i 1 j - 1 j 1 comb[i - 1][j] comb[i - 1] comb i - 1 i 1 j int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int ans = 0; ans 0 System.out.println(comb[n][2] + comb[m][2]) System.out.println System.out System System.out comb[n][2] + comb[m][2] comb[n][2] comb[n] comb n 2 comb[m][2] comb[m] comb m 2 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long[][] comb = new long[101][101];
        for (int i = 0; i <= 100; i++) {
            for (int j = 0; j <= i; j++) {
                if (j == 0 || j == i) {
                    comb[i][j] = 1;
                } else {
                    comb[i][j] = comb[i - 1][j - 1] + comb[i - 1][j];
                }
            }
        }
        int n = sc.nextInt();
        int m = sc.nextInt();
        int ans = 0;
        System.out.println(comb[n][2] + comb[m][2]);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long[][] comb = new long[101][101];
        for (int i = 0; i <= 100; i++) {
            for (int j = 0; j <= i; j++) {
                if (j == 0 || j == i) {
                    comb[i][j] = 1;
                } else {
                    comb[i][j] = comb[i - 1][j - 1] + comb[i - 1][j];
                }
            }
        }
        int n = sc.nextInt();
        int m = sc.nextInt();
        int ans = 0;
        System.out.println(comb[n][2] + comb[m][2]);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long[][] comb = new long[101][101];
        for (int i = 0; i <= 100; i++) {
            for (int j = 0; j <= i; j++) {
                if (j == 0 || j == i) {
                    comb[i][j] = 1;
                } else {
                    comb[i][j] = comb[i - 1][j - 1] + comb[i - 1][j];
                }
            }
        }
        int n = sc.nextInt();
        int m = sc.nextInt();
        int ans = 0;
        System.out.println(comb[n][2] + comb[m][2]);
    }
}