#include using namespace std; using ll = long long; using P = pair; #define rep(i,n) for(int i=0;i> a >> b >> c >> d; int ans = 0; for (int i = a;i<=b;i++){ for (int j=c;j<=d;j++){ if (i!=j) ans++; } } cout << ans << endl; return 0; }