#include<iostream> using namespace std; int main(){ int a,b,c,d,n; cin>>a>>b>>c>>d; n=(a+b)*(c-d); cout<<n; return 0; }