import java.util.Scanner;

/**
 * TITLE : The Number of Even Pairs
 * URL : https://atcoder.jp/contests/abc159/tasks/abc159_a
 */
public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        sc.close();
        int answer = 0;
        for (int i = 1; i < N; i++) {
            for (int j = i; j < N; j++) {
                answer++;
            }
        }
        for (int i = 1; i < M; i++) {
            for (int j = i; j < M; j++) {
                answer++;
            }
        }
        System.out.println(answer);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        sc.close();
        int answer = 0;
        for (int i = 1; i < N; i++) {
            for (int j = i; j < N; j++) {
                answer++;
            }
        }
        for (int i = 1; i < M; i++) {
            for (int j = i; j < M; j++) {
                answer++;
            }
        }
        System.out.println(answer);
    }
} Main public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        sc.close();
        int answer = 0;
        for (int i = 1; i < N; i++) {
            for (int j = i; j < N; j++) {
                answer++;
            }
        }
        for (int i = 1; i < M; i++) {
            for (int j = i; j < M; j++) {
                answer++;
            }
        }
        System.out.println(answer);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        sc.close();
        int answer = 0;
        for (int i = 1; i < N; i++) {
            for (int j = i; j < N; j++) {
                answer++;
            }
        }
        for (int i = 1; i < M; i++) {
            for (int j = i; j < M; j++) {
                answer++;
            }
        }
        System.out.println(answer);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int M = sc.nextInt(); M sc.nextInt() sc.nextInt sc sc.close() sc.close sc int answer = 0; answer 0 for (int i = 1; i < N; i++) {
            for (int j = i; j < N; j++) {
                answer++;
            }
        } int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
            for (int j = i; j < N; j++) {
                answer++;
            }
        } {
            for (int j = i; j < N; j++) {
                answer++;
            }
        } for (int j = i; j < N; j++) {
                answer++;
            } int j = i; int j = i; j i j < N j N j++ j++ j {
                answer++;
            } {
                answer++;
            } answer++ answer for (int i = 1; i < M; i++) {
            for (int j = i; j < M; j++) {
                answer++;
            }
        } int i = 1; int i = 1; i 1 i < M i M i++ i++ i {
            for (int j = i; j < M; j++) {
                answer++;
            }
        } {
            for (int j = i; j < M; j++) {
                answer++;
            }
        } for (int j = i; j < M; j++) {
                answer++;
            } int j = i; int j = i; j i j < M j M j++ j++ j {
                answer++;
            } {
                answer++;
            } answer++ answer System.out.println(answer) System.out.println System.out System System.out answer String args[] args public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        sc.close();
        int answer = 0;
        for (int i = 1; i < N; i++) {
            for (int j = i; j < N; j++) {
                answer++;
            }
        }
        for (int i = 1; i < M; i++) {
            for (int j = i; j < M; j++) {
                answer++;
            }
        }
        System.out.println(answer);
    }
} public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        sc.close();
        int answer = 0;
        for (int i = 1; i < N; i++) {
            for (int j = i; j < N; j++) {
                answer++;
            }
        }
        for (int i = 1; i < M; i++) {
            for (int j = i; j < M; j++) {
                answer++;
            }
        }
        System.out.println(answer);
    }
} Main
import java.util.Scanner;

/**
 * TITLE : The Number of Even Pairs
 * URL : https://atcoder.jp/contests/abc159/tasks/abc159_a
 */
public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        sc.close();
        int answer = 0;
        for (int i = 1; i < N; i++) {
            for (int j = i; j < N; j++) {
                answer++;
            }
        }
        for (int i = 1; i < M; i++) {
            for (int j = i; j < M; j++) {
                answer++;
            }
        }
        System.out.println(answer);
    }
}