#include int main(void){ int A,B,C,D; std::cin>>A>>B>>C>>D; //WA対応 int xx=(B>D?D:B)-(A>C?A:C)+1; if(xx<0){ xx=0; } std::cout<<(B-A+1)*(D-C+1)-xx<