"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const N = parseInt(arg[0].split(" ")[0]); // even
    const M = parseInt(arg[0].split(" ")[1]); // odd
    
    // 偶奇を選んだ時だけが答えになる
    // 4C2, 3C2
    
    let temp1 = (N * (N - 1)) / 2
    let temp2 = (M * (M - 1)) / 2;
    
    console.log(temp1 + temp2);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));