
object Main extends App {
     
    val Array(ttlRow, ttlCol) =  io.StdIn.readLine.split(" ").map(_.toInt)
    val Array(row, col) =  io.StdIn.readLine.split(" ").map(_.toInt)
    println(balanceCell(ttlRow, ttlCol, row, col))
    def balanceCell(ttlRow:Int, ttlCol:Int, row:Int, col:Int):Int = {
        val rowBal = ttlRow - row 
        val colBal = ttlCol - col 
        rowBal * colBal 
    }
}