import scala.io.{StdIn => in}

object Main extends App {
  val Array(hh, ww) = in.readLine.split(" ").map(_.toInt)
  val table = Array.ofDim[Boolean](hh,ww)
  val Array(h, w) = in.readLine.split(" ").map(_.toInt)
  (0 until h).foreach(i => (0 until ww).foreach(j => table(i)(j) = true))
  (0 until w).foreach(i => (0 until hh).foreach(j => table(j)(i) = true))
  val ans = (hh * ww) - table.map(e => e.count(_ == true)).sum
  println(ans)
}