#!/usr/bin/env python3



import re



n = eval(input())

n = re.split(" ",n)



m = eval(input())

m = re.split(" ",m)



a = int(n[0])* int(n[1])

b = (int(m[0]) * int(n[1])) + (int(m[1]) * int(n[0]))

b = a-b

c = int(m[0]) * int(m[1])

print((b+c))
#!/usr/bin/env python3

#ABC121 A



H,W = list(map(int,input().split()))

h,w = list(map(int,input().split()))



print(((H-h)*(W-w)))

#!/usr/bin/env python3
import re

n = eval(input())
n = re.split(" ", n)
m = eval(input())
m = re.split(" ", m)
a = int(n[0]) * int(n[1])
b = (int(m[0]) * int(n[1])) + (int(m[1]) * int(n[0]))
b = a - b
c = int(m[0]) * int(m[1])
print((b + c))

#!/usr/bin/env python3
# ABC121 A
H, W = list(map(int, input().split()))
h, w = list(map(int, input().split()))
print(((H - h) * (W - w)))

-import re - -n = eval(input()) -n = re.split(" ", n) -m = eval(input()) -m = re.split(" ", m) -a = int(n[0]) * int(n[1]) -b = (int(m[0]) * int(n[1])) + (int(m[1]) * int(n[0])) -b = a - b -c = int(m[0]) * int(m[1]) -print((b + c)) +# ABC121 A +H, W = list(map(int, input().split())) +h, w = list(map(int, input().split())) +print(((H - h) * (W - w)))