#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;

int main() {
    int x1,y1,x2,y2;
    cin>>x1>>y1>>x2>>y2;
    long double de,dm;
    de=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
    dm = fabs(x1 - x2) + fabs(y1 - y2);//fabs浮点数绝对值,abs整数绝对值
     cout << fixed << setprecision(18) << abs(dm - de) << endl;
    return 0;
}
// 64 位输出请用 printf("%lld")