#include <stdio.h>
#include<math.h>

int main()
{
	int x1, y1, x2, y2;
	//输入数据
	scanf("%d %d", &x1, &y1);
	scanf("%d %d", &x2, &y2);

	float dx = (float)(x1 - x2);
	float dy = (float)(y1 - y2);

	float manhattan = fabsf(dx) + fabsf(dy);
	float euclidean = sqrtf(dx * dx + dy * dy);
	float diff = fabsf(manhattan - euclidean);

	printf("%f", diff);

	return 0;
}