n1, n2 = gets.chomp.split(" ").map{|x| x.to_i}
n3, n4 = gets.chomp.split(" ").map{|x| x.to_i}

puts n1 * n4 - n2 * n3
