object WhiteCells extends App {
   val f = scala.io.StdIn.readLine
   val s = scala.io.StdIn.readLine

   val H = f.split(" ")(0).toInt
   val W = f.split(" ")(1).toInt
   val h = s.split(" ")(0).toInt
   val w = s.split(" ")(1).toInt

  println(solve(H, W, h, w))
  def solve(H: Int, W: Int, h: Int, w: Int) : Int = {
    val cells = H * W
    val use = h * W + w * H - h * w

    cells - use
  }
}
