#include using namespace std; typedef long long ll; typedef pair pii; typedef vector vi; #define mp make_pair #define pb push_back #define pf push_front #define fi first #define se second #define MOD 1000000007 int main(){ int A,B,C,D; int ans = 0; cin >> A >> B >> C >> D; ans = abs(B-A+1)*abs(D-C+1); if(A==C&&B==D){ cout << ans - B+A-1 <=A){ ans -= D-A+1; } cout << ans << endl; return 0; }