#include <stdio.h>
#include <math.h>
int main() {
    int x1, x2, y1, y2;
    double de, dm;
    scanf("%d %d", &x1, &y1);
    scanf("%d %d", &x2, &y2);
    de = sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2));
    dm = fabs(x1 - x2) + fabs(y1 - y2);
    double det = fabs(dm - de);
    printf("%lf", det);
    return 0;
}