fun main(args: Array<String>) {
    abc121a()
}

fun abc121a() {
    val (h1, w1) = readLine()!!.split(" ").map { it.toInt() }
    val (h2, w2) = readLine()!!.split(" ").map { it.toInt() }

    val totalArea = h1 * w1

    val verticalBlackArea = h2 * w1
    val horizontalBlackArea = w2 * h1
    val totalBlackArea = verticalBlackArea + horizontalBlackArea - (h2 * w2)

    val totalWhiteArea = totalArea - totalBlackArea
    println(totalWhiteArea)
}
