#include using namespace std; int main(){ int a,b,c,d,ans=0; cin>>a>>b>>c>>d; for(int i=a;i<=b;++i)for(int j=c;j<=d;++j)if(i!=j)++ans; cout<