#include using ll = long long; using llu = long long unsigned; using namespace std; int main() { int Px, Py, Qx, Qy; cin >> Px >> Py >> Qx >> Qy; double result = (abs((double)Px-Qx) + abs(Py-Qy))/2; cout << result << endl; return 0; }