const main = (inputs) => {
  var array = inputs[0].split(" ");
  var A = Number(array[0]);
  var B = Number(array[1]);
  var countA = 1;
  var countB = 1;

  if (A === 1 && B === 1) {
    console.log(0);
  } else {
    for (var i = A; i >= A - 1; i--) {
      countA = countA * i;
    }
    countA = countA / 2;

    for (var j = B; j >= B - 1; j--) {
      countB = countB * j;
    }
    countB = countB / 2;
  }
  console.log(countA + countB);
}

main(require('fs').readFileSync('/dev/stdin', 'UTF-8').trim().split("\n"));