#include using namespace std; #define int long long #define pb push_back #define fi first #define se second #define FOR(i,n) for(int i = 0;i=(s);i--) #define all(v) (v).begin(),(v).end() #define chmin(a,b) a=min((a),(b)) #define chmax(a,b) a=max((a),(b)) #define endl '\n' #define IOS() ios_base::sync_with_stdio(0);cin.tie(0) typedef long long ll; typedef pairpint; typedef vectorvint; typedef vectorvpint; const ll MOD=1000000007,INF=1ll<<60; int A,B,C,D; signed main() { IOS(); cin>>A>>B>>C>>D; int ans=0; rep(i,A,B+1){ rep(j,C,D+1){ if(i!=j)ans++; } } cout<