function Main (input) {
    input = input.split(' ');
    var a = parseInt(input[0]);
    var b = parseInt(input[1]);

    var ans = (a > 1 ? a * (a-1) / 2: 0) + (b > 1 ? b * (b-1) / 2: 0);

    console.log(ans)
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));