fun main(args : Array<String>) {
    val (H, W) = readLine()!!.split(" ").map { it.toInt() }
    val (h, w) = readLine()!!.split(" ").map { it.toInt() }

    val a = Array(H, { Array(W, { false })})

    (0..h-1).forEach {
        a[it].fill(true)
    }

    (0..w-1).forEach {ww ->
        (0..H-1).forEach { hh->
           a[hh][ww] = true
        }
    }


    var ans = 0
    (0..H-1).forEach { hh ->
        (0..W-1).forEach { ww ->
            if (a[hh][ww]) {
                ans++
            }
        }
    }

    println(H * W - ans)
}