num = map(int, input().split(' '))
l = list(num)
#map对象不可下标
print((l[0]+l[1]) * (l[2]-l[3]))