#include #include #include #include using namespace std; int main(){ long int x1,x2,y1,y2,a,b,ans; cin >> x1 >> y1 >> x2 >> y2; if(x1-x2>0) a=x1-x2; else a=(x1-x2)*-1; if(y1-y2>0) b=y1-y2; else b=(y1-y2)*-1; ans = (a+b)/2; if((a%2==0&&b%2==0)||(a%2==1&&b%2==1)) cout << ans; else cout << (double)ans+0.5; return 0; }