#include #define rep(i,n)for(int i=0;i<(n);i++) using namespace std; #define double long double int main(){ double a,b,c,d;cin>>a>>b>>c>>d; double l=0,r=1000; rep(i,10000){ double a1=l+(r-l)/3; double b1=l+(r-l)/3*2; if(hypot(a,b-a1)+hypot(c,d-a1)<=hypot(a,b-b1)+hypot(c,d-b1))r=b1; else l=a1; } printf("%.12LF\n",l); }