let white_cells h w h0 w0 = h * w - h0 * w - w0 * h + w0 * h0

let h, w = Scanf.sscanf (read_line ()) "%d %d" (fun a b -> (a, b))
let h0, w0 = Scanf.sscanf (read_line ()) "%d %d" (fun a b -> (a, b))

let () = Printf.printf "%d\n" (white_cells h w h0 w0)