#include #include #include #include #include #include #include #include #define FOR(i, a, b) for(int i=(a);i<=(b);i++) #define RFOR(i, a, b) for(int i=(a);i>=(b);i--) #define MOD 1000000007 using namespace std; int main(void) { int px, py, qx, qy; cin >> px >> py >> qx >> qy; cout << (abs(px - qx) + abs(py - qy))/2 << endl; return 0; }