function Main(input){ 
  var H = input.split("\n")[0].split(" ")[0];
  var W = input.split("\n")[0].split(" ")[1];
  var h = input.split("\n")[1].split(" ")[0];
  var w = input.split("\n")[1].split(" ")[1];
  var twice = parseInt(h,10)*parseInt(w,10);
  var row = parseInt(H,10)*parseInt(w,10);
  var col = parseInt(h,10)*parseInt(W,10);
  var S = parseInt(H,10)*parseInt(W,10);
  var answer = S -(row + col -twice);

  console.log(answer);

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