numbers=[int(i) for i in input().split()]
print((numbers[0]+numbers[1])*(numbers[2]-numbers[3]))