#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { long long x,y,x2,y2; cin>>x>>y>>x2>>y2; long long res=max(abs(x),abs(y)); int way1,way2; if(x>=0 && y>=0) way1=0; if(x<=0 && y>=0) way1=1; if(x<=0 && y<=0) way1=2; if(x>=0 && y<=0) way1=3; if(x2>=0 && y2>=0) way2=0; if(x2<=0 && y2>=0) way2=1; if(x2<=0 && y2<=0) way2=2; if(x2>=0 && y2<=0) way2=3; if(x==y && x2==y2 && max(abs(x),abs(y))>max(abs(x2),abs(y2)) && way1==way2) res++; cout<