#include #include using namespace std; int main(){ int A,B,C,D; cin>>A>>B>>C>>D; int y=D-C+1; int sum=0; for(int x=A;x<=B;x++){ if((x>=C)&&(x<=D)){ sum+=(y-1); }else{ sum+=y; } } cout<