#include using namespace std; typedef long long ll; const ll inf = 100100100100100; const ll mod = 1000000007; int main(){ std::ios::sync_with_stdio(false); std::cin.tie(0); int a,b,c,d; cin>>a>>b>>c>>d; ll count=0; for(int i=a;i<=b;i++){ for(int j=c;j<=d;j++){ if(i==j)continue; count++; } } cout<