import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        double x1,y1,x2,y2,de,dm,result;
        x1=in.nextDouble();
        y1=in.nextDouble();
        x2=in.nextDouble();
        y2=in.nextDouble();
        de=Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
        dm=Math.abs(x1-x2)+Math.abs(y1-y2);
        result=Math.abs(de-dm);
        System.out.printf("%.20f",result);
    }
}