#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef pair<int,int> pii;
typedef vector<pii > vii;
typedef vector<pair<int, pair<int, int> > > viii;
typedef pair<ll,ll> pll;
typedef vector<string> vs;
typedef vector<vii> vvii;

#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define MEM(a,b) memset(a,(b),sizeof(a))
#define tr(c,it) for(typeof((c).begin()) it = (c).begin(); it != (c).end(); it++)
#define all(a) a.begin(),a.end()
#define loop(x,a,b) for(int (x) = (a);(x)<(b);(x)++)
#define rep(x,n)   for(int (x)=0;(x)<(n);(x)++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define ain(a,n) int ((a)[(n)]); for(int i=0; i<(n); i++) cin>>((a)[i])
#define md 1000000007
#define MAXN 200005

#define pr16

#ifdef pr16
  #define pr(x)                 cerr << #x << ": " << x << endl;
  #define pr2(x, y)             cerr << #x << ": " << x << " | " << #y << ": " << y << endl;
  #define pr3(x, y, z)          cerr << #x << ": " << x << " | " << #y << ": " << y << " | " << #z << ": " << z << endl;
  #define pr4(a, b, c, d)       cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << endl;
  #define pr5(a, b, c, d, e)    cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << endl;
  #define pr6(a, b, c, d, e, f) cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << " | " << #f << ": " << f << endl;
  #define prdd(a,r,c) for(int i=0;i<(r);i++) { for(int j = 0;j<(c);j++) cerr<<a[i][j]<<" "; cerr<<endl; } cerr<<endl;
  #define prc(a) tr(a, it) cerr<<*(it)<<" "; cerr<<endl
  #define pra(a,n) for(int i=0; i<(n); i++) cerr<<((a)[i])<<" "; cerr<<"\n"
  #define prdd(a,r,c) for(int i=0;i<(r);i++) { for(int j = 0;j<(c);j++) cerr<<a[i][j]<<" "; cerr<<endl; } cerr<<endl;
  #define prddd(a,x,y,z) for(int i=0;i<x;i++) {cerr<<"layer "<<i<<":\n";prdd(a[i],y,z)}

#else
  #define pr(x)
  #define pr2(x, y)
  #define pr3(x, y, z)
  #define pr4(a, b, c, d)
  #define pr5(a, b, c, d, e)
  #define pr6(a, b, c, d, e, f)
  #define tr(c,it)
  #define prc(a)
  #define pra(a,n)
  #define prdd(a, r, c)
  #define prddd(a,x,y,z)
#endif

double a,b,c,d;

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cin>>a>>b>>c>>d;
    double x = abs(a*d-c*b)/(abs(a)+abs(b)+abs(c)+abs(d));
    double mx = 0;
    cout<<fixed<<setprecision(10)<<x<<"\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef pair<int,int> pii;
typedef vector<pii > vii;
typedef vector<pair<int, pair<int, int> > > viii;
typedef pair<ll,ll> pll;
typedef vector<string> vs;
typedef vector<vii> vvii;

#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define MEM(a,b) memset(a,(b),sizeof(a))
#define tr(c,it) for(typeof((c).begin()) it = (c).begin(); it != (c).end(); it++)
#define all(a) a.begin(),a.end()
#define loop(x,a,b) for(int (x) = (a);(x)<(b);(x)++)
#define rep(x,n)   for(int (x)=0;(x)<(n);(x)++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define ain(a,n) int ((a)[(n)]); for(int i=0; i<(n); i++) cin>>((a)[i])
#define md 1000000007
#define MAXN 200005

#define pr16

#ifdef pr16
  #define pr(x)                 cerr << #x << ": " << x << endl;
  #define pr2(x, y)             cerr << #x << ": " << x << " | " << #y << ": " << y << endl;
  #define pr3(x, y, z)          cerr << #x << ": " << x << " | " << #y << ": " << y << " | " << #z << ": " << z << endl;
  #define pr4(a, b, c, d)       cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << endl;
  #define pr5(a, b, c, d, e)    cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << endl;
  #define pr6(a, b, c, d, e, f) cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << " | " << #f << ": " << f << endl;
  #define prdd(a,r,c) for(int i=0;i<(r);i++) { for(int j = 0;j<(c);j++) cerr<<a[i][j]<<" "; cerr<<endl; } cerr<<endl;
  #define prc(a) tr(a, it) cerr<<*(it)<<" "; cerr<<endl
  #define pra(a,n) for(int i=0; i<(n); i++) cerr<<((a)[i])<<" "; cerr<<"\n"
  #define prdd(a,r,c) for(int i=0;i<(r);i++) { for(int j = 0;j<(c);j++) cerr<<a[i][j]<<" "; cerr<<endl; } cerr<<endl;
  #define prddd(a,x,y,z) for(int i=0;i<x;i++) {cerr<<"layer "<<i<<":\n";prdd(a[i],y,z)}

#else
  #define pr(x)
  #define pr2(x, y)
  #define pr3(x, y, z)
  #define pr4(a, b, c, d)
  #define pr5(a, b, c, d, e)
  #define pr6(a, b, c, d, e, f)
  #define tr(c,it)
  #define prc(a)
  #define pra(a,n)
  #define prdd(a, r, c)
  #define prddd(a,x,y,z)
#endif

double a,b,c,d;

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cin>>a>>b>>c>>d;
    double x = abs(a*d-c*b)/(abs(a)+abs(b)+abs(c)+abs(d) + 1e-9);
    double mx = 0;
    cout<<fixed<<setprecision(10)<<x<<"\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef pair<int,int> pii;
typedef vector<pii > vii;
typedef vector<pair<int, pair<int, int> > > viii;
typedef pair<ll,ll> pll;
typedef vector<string> vs;
typedef vector<vii> vvii;

#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define MEM(a,b) memset(a,(b),sizeof(a))
#define tr(c,it) for(typeof((c).begin()) it = (c).begin(); it != (c).end(); it++)
#define all(a) a.begin(),a.end()
#define loop(x,a,b) for(int (x) = (a);(x)<(b);(x)++)
#define rep(x,n)   for(int (x)=0;(x)<(n);(x)++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define ain(a,n) int ((a)[(n)]); for(int i=0; i<(n); i++) cin>>((a)[i])
#define md 1000000007
#define MAXN 200005

#define pr16

#ifdef pr16
  #define pr(x)                 cerr << #x << ": " << x << endl;
  #define pr2(x, y)             cerr << #x << ": " << x << " | " << #y << ": " << y << endl;
  #define pr3(x, y, z)          cerr << #x << ": " << x << " | " << #y << ": " << y << " | " << #z << ": " << z << endl;
  #define pr4(a, b, c, d)       cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << endl;
  #define pr5(a, b, c, d, e)    cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << endl;
  #define pr6(a, b, c, d, e, f) cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << " | " << #f << ": " << f << endl;
  #define prdd(a,r,c) for(int i=0;i<(r);i++) { for(int j = 0;j<(c);j++) cerr<<a[i][j]<<" "; cerr<<endl; } cerr<<endl;
  #define prc(a) tr(a, it) cerr<<*(it)<<" "; cerr<<endl
  #define pra(a,n) for(int i=0; i<(n); i++) cerr<<((a)[i])<<" "; cerr<<"\n"
  #define prdd(a,r,c) for(int i=0;i<(r);i++) { for(int j = 0;j<(c);j++) cerr<<a[i][j]<<" "; cerr<<endl; } cerr<<endl;
  #define prddd(a,x,y,z) for(int i=0;i<x;i++) {cerr<<"layer "<<i<<":\n";prdd(a[i],y,z)}

#else
  #define pr(x)
  #define pr2(x, y)
  #define pr3(x, y, z)
  #define pr4(a, b, c, d)
  #define pr5(a, b, c, d, e)
  #define pr6(a, b, c, d, e, f)
  #define tr(c,it)
  #define prc(a)
  #define pra(a,n)
  #define prdd(a, r, c)
  #define prddd(a,x,y,z)
#endif

double a,b,c,d;
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cin>>a>>b>>c>>d;

    double mx = 1e18;
    rep(bm,1<<4)
    {
      vi v;
      int bmc = bm;
      rep(j,4)
      {
        v.pb(bmc % 2);
        bmc /= 2;
        v[j] = v[j]*2 -1;
      }
      prc(v);
      double ac = a*v[0],bc = b*v[1],cc = c*v[2],dc = d*v[3];

      double x = abs(ac*dc-cc*bc)/abs(ac+bc+cc+dc + 1e-12);
      mx = min(x,mx);
    }
    cout<<fixed<<setprecision(12)<<mx<<"\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef pair<int,int> pii;
typedef vector<pii > vii;
typedef vector<pair<int, pair<int, int> > > viii;
typedef pair<ll,ll> pll;
typedef vector<string> vs;
typedef vector<vii> vvii;

#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define MEM(a,b) memset(a,(b),sizeof(a))
#define tr(c,it) for(typeof((c).begin()) it = (c).begin(); it != (c).end(); it++)
#define all(a) a.begin(),a.end()
#define loop(x,a,b) for(int (x) = (a);(x)<(b);(x)++)
#define rep(x,n)   for(int (x)=0;(x)<(n);(x)++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define ain(a,n) int ((a)[(n)]); for(int i=0; i<(n); i++) cin>>((a)[i])
#define md 1000000007
#define MAXN 200005

#define pr16

#ifdef pr16
  #define pr(x)                 cerr << #x << ": " << x << endl;
  #define pr2(x, y)             cerr << #x << ": " << x << " | " << #y << ": " << y << endl;
  #define pr3(x, y, z)          cerr << #x << ": " << x << " | " << #y << ": " << y << " | " << #z << ": " << z << endl;
  #define pr4(a, b, c, d)       cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << endl;
  #define pr5(a, b, c, d, e)    cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << endl;
  #define pr6(a, b, c, d, e, f) cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << " | " << #f << ": " << f << endl;
  #define prdd(a,r,c) for(int i=0;i<(r);i++) { for(int j = 0;j<(c);j++) cerr<<a[i][j]<<" "; cerr<<endl; } cerr<<endl;
  #define prc(a) tr(a, it) cerr<<*(it)<<" "; cerr<<endl
  #define pra(a,n) for(int i=0; i<(n); i++) cerr<<((a)[i])<<" "; cerr<<"\n"
  #define prdd(a,r,c) for(int i=0;i<(r);i++) { for(int j = 0;j<(c);j++) cerr<<a[i][j]<<" "; cerr<<endl; } cerr<<endl;
  #define prddd(a,x,y,z) for(int i=0;i<x;i++) {cerr<<"layer "<<i<<":\n";prdd(a[i],y,z)}

#else
  #define pr(x)
  #define pr2(x, y)
  #define pr3(x, y, z)
  #define pr4(a, b, c, d)
  #define pr5(a, b, c, d, e)
  #define pr6(a, b, c, d, e, f)
  #define tr(c,it)
  #define prc(a)
  #define pra(a,n)
  #define prdd(a, r, c)
  #define prddd(a,x,y,z)
#endif

long double a,b,c,d;

int fn(long double x)
{
    long double mn = 1e18,mx = -1e18;
    rep(bm,16)
    {
        vi v;
        int bmc = bm;
        rep(i,4)
        {
            v.pb(bmc % 2);
            bmc /= 2;
        }
        rep(i,4)
            v[i] = v[i]*2-1;
        long double tot = (v[0] * x + a)*(v[1] * x + d) - (v[2] * x + c) * (v[3] * x + b);
        mx = max(mx,tot);
        mn = min(mn,tot);
    }
    if(mx > -1e-20 and mn < 1e-20)
        return 1;
    return 0;
}

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cin>>a>>b>>c>>d;
    long double l = 0,r = 1e18;

    while(r-l > 1e-10)
    {
        long double m = (l+r)/2;
        if(fn(m) == 0)
            l = m;
        else
            r = m;
    }
    cout<<fixed<<setprecision(12)<<l<<"\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef pair<int,int> pii;
typedef vector<pii > vii;
typedef vector<pair<int, pair<int, int> > > viii;
typedef pair<ll,ll> pll;
typedef vector<string> vs;
typedef vector<vii> vvii;

#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define MEM(a,b) memset(a,(b),sizeof(a))
#define tr(c,it) for(typeof((c).begin()) it = (c).begin(); it != (c).end(); it++)
#define all(a) a.begin(),a.end()
#define loop(x,a,b) for(int (x) = (a);(x)<(b);(x)++)
#define rep(x,n)   for(int (x)=0;(x)<(n);(x)++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define ain(a,n) int ((a)[(n)]); for(int i=0; i<(n); i++) cin>>((a)[i])
#define md 1000000007
#define MAXN 200005

#define pr16

#ifdef pr16
  #define pr(x)                 cerr << #x << ": " << x << endl;
  #define pr2(x, y)             cerr << #x << ": " << x << " | " << #y << ": " << y << endl;
  #define pr3(x, y, z)          cerr << #x << ": " << x << " | " << #y << ": " << y << " | " << #z << ": " << z << endl;
  #define pr4(a, b, c, d)       cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << endl;
  #define pr5(a, b, c, d, e)    cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << endl;
  #define pr6(a, b, c, d, e, f) cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << " | " << #f << ": " << f << endl;
  #define prdd(a,r,c) for(int i=0;i<(r);i++) { for(int j = 0;j<(c);j++) cerr<<a[i][j]<<" "; cerr<<endl; } cerr<<endl;
  #define prc(a) tr(a, it) cerr<<*(it)<<" "; cerr<<endl
  #define pra(a,n) for(int i=0; i<(n); i++) cerr<<((a)[i])<<" "; cerr<<"\n"
  #define prdd(a,r,c) for(int i=0;i<(r);i++) { for(int j = 0;j<(c);j++) cerr<<a[i][j]<<" "; cerr<<endl; } cerr<<endl;
  #define prddd(a,x,y,z) for(int i=0;i<x;i++) {cerr<<"layer "<<i<<":\n";prdd(a[i],y,z)}

#else
  #define pr(x)
  #define pr2(x, y)
  #define pr3(x, y, z)
  #define pr4(a, b, c, d)
  #define pr5(a, b, c, d, e)
  #define pr6(a, b, c, d, e, f)
  #define tr(c,it)
  #define prc(a)
  #define pra(a,n)
  #define prdd(a, r, c)
  #define prddd(a,x,y,z)
#endif

double a,b,c,d;

int fn(double x)
{
    double mn = 1e18,mx = -1e18;
    rep(bm,16)
    {
        vi v;
        int bmc = bm;
        rep(i,4)
        {
            v.pb(bmc % 2);
            bmc /= 2;
        }
        rep(i,4)
            v[i] = v[i]*2-1;
        double tot = (v[0] * x + a)*(v[1] * x + d) - (v[2] * x + c) * (v[3] * x + b);
        mx = max(mx,tot);
        mn = min(mn,tot);
    }
    if(mx > -1e-11 and mn < 1e-11)
        return 1;
    return 0;
}

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cin>>a>>b>>c>>d;
    double l = 0,r = 1e18;

    while(r-l > 1e-12)
    {
        double m = (l+r)/2;
        if(fn(m) == 0)
            l = m;
        else
            r = m;
    }
    cout<<fixed<<setprecision(12)<<l<<"\n";
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef pair<double, double> pdd;
const double oo = 1e30;
void relax(pdd a, pdd b, double &left, double &right){
	double x = a.first * b.first;
	double y = a.second * b.second;
	double z = a.first * b.second;
	double w = a.second * b.first;
	double mi = min(min(x, y), min(w, z));
	double ma = max(max(x, y), max(w, z));
	left = min(mi, x);
	right = max(ma, y);
}
pdd mul(pdd a, pdd b){
	double x1 = a.first;
	double y1 = a.second;
	double x2 = b.first;
	double y2 = b.second;
	double x = oo, y = -oo;
	if(x1<0 && 0<y1){
		if(x2<0 && 0<y2){
			relax(make_pair(x1, 0), make_pair(x2, 0), x, y);
			relax(make_pair(x1, 0), make_pair(0, y2), x, y);
			relax(make_pair(0, y1), make_pair(x2, 0), x, y);
			relax(make_pair(0, y1), make_pair(0, y2), x, y);
		}
		else{
			relax(make_pair(x1, 0), make_pair(x2, y2), x, y);
			relax(make_pair(0, y1), make_pair(x2, y2), x, y);
		}
	}
	else{
		if(x2<0 && 0<y2){
			relax(make_pair(x1, y1), make_pair(x2, 0), x, y);
			relax(make_pair(x1, y1), make_pair(0, y2), x, y);
		}
		else{
			relax(make_pair(x1, y1), make_pair(x2, y2), x, y);
		}
	}
	return make_pair(x, y);
}
bool judge(double a, double b, double c, double d, double t){
	pdd x = mul(make_pair(a-t, a+t), make_pair(d-t, d+t));
	pdd y = mul(make_pair(b-t, b+t), make_pair(c-t, c+t));
	// printf("%f %f %f %f\n", x.first, x.second, y.first, y.second);
	// printf("%d\n", !(x.first>y.second || y.first>x.second));
	return !(x.first>y.second || y.first>x.second);
}
int main()
{
	// freopen("in.txt", "r", stdin);
	int a, b, c, d;
	while(4==scanf("%d%d%d%d", &a, &b, &c, &d)){
		double lo = 0.0, hi = 1e9;
		int test = 0;
		while(lo+1e-10<hi){
			double m = (lo+hi)/2;
			if(++test>1000)	break;
			// printf("m: %f %f %f\n", lo, m, hi);
			if(judge(a, b, c, d, m))	hi = m;
			else	lo = m;
		}
		if(judge(a, b, c, d, lo))	printf("%f\n", lo);
		else	printf("%.10f\n", hi);
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<double, double> pdd;
const double oo = 1e40;
void relax(pdd a, pdd b, double &left, double &right){
    double x = a.first * b.first;
    double y = a.second * b.second;
    double z = a.first * b.second;
    double w = a.second * b.first;
    double mi = min(min(x, y), min(w, z));
    double ma = max(max(x, y), max(w, z));
    left = min(mi, left);
    right = max(ma, right);
}
pdd mul(pdd a, pdd b){
    double x1 = a.first;
    double y1 = a.second;
    double x2 = b.first;
    double y2 = b.second;
    double x = oo, y = -oo;
    // printf("%f %f %f %f\n", x1, y1, x2, y2);
    if(x1<0 && 0<y1){
        if(x2<0 && 0<y2){
            relax(make_pair(x1, 0), make_pair(x2, 0), x, y);
            relax(make_pair(x1, 0), make_pair(0, y2), x, y);
            relax(make_pair(0, y1), make_pair(x2, 0), x, y);
            relax(make_pair(0, y1), make_pair(0, y2), x, y);
        }
        else{
            relax(make_pair(x1, 0), make_pair(x2, y2), x, y);
            relax(make_pair(0, y1), make_pair(x2, y2), x, y);
        }
    }
    else{
        if(x2<0 && 0<y2){
            // printf("%f %f\n", x, y);
            relax(make_pair(x1, y1), make_pair(x2, 0), x, y);
            // printf("%f %f\n", x, y);
            relax(make_pair(x1, y1), make_pair(0, y2), x, y);
            // printf("%f %f\n", x, y);
        }
        else{
            relax(make_pair(x1, y1), make_pair(x2, y2), x, y);
        }
    }
    // printf("%f %f %f %f %f %f\n", x1, y1, x2, y2, x, y);
    return make_pair(x, y);
}
bool judge(double a, double b, double c, double d, double t){
    pdd x = mul(make_pair(a-t, a+t), make_pair(d-t, d+t));
    pdd y = mul(make_pair(b-t, b+t), make_pair(c-t, c+t));
    // printf("%f %f %f %f\n", x.first, x.second, y.first, y.second);
    return !(x.first>y.second || y.first>x.second);
}
int main()
{
    // freopen("in.txt", "r", stdin);
    int a, b, c, d;
    while(4==scanf("%d%d%d%d", &a, &b, &c, &d)){
        double lo = 0.0, hi = 1e9;
        // judge(a, b, c, d, 36);
        // return 0;
        int test = 0;
        while(lo+1e-10<hi){
            double m = (lo+hi)/2;
            if(judge(a, b, c, d, m))    hi = m;
            else    lo = m;
            if(++test>100000) break;
        }
        if(judge(a, b, c, d, lo))   printf("%f\n", lo);
        else    printf("%.10f\n", hi);
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef pair<double, double> pdd;
const double oo = 1e30;
void relax(pdd a, pdd b, double &left, double &right){
	double x = a.first * b.first;
	double y = a.second * b.second;
	double z = a.first * b.second;
	double w = a.second * b.first;
	double mi = min(min(x, y), min(w, z));
	double ma = max(max(x, y), max(w, z));
	left = min(mi, x);
	right = max(ma, y);
}
pdd mul(pdd a, pdd b){
	double x1 = a.first;
	double y1 = a.second;
	double x2 = b.first;
	double y2 = b.second;
	double x = oo, y = -oo;
	if(x1<0 && 0<y1){
		if(x2<0 && 0<y2){
			relax(make_pair(x1, 0), make_pair(x2, 0), x, y);
			relax(make_pair(x1, 0), make_pair(0, y2), x, y);
			relax(make_pair(0, y1), make_pair(x2, 0), x, y);
			relax(make_pair(0, y1), make_pair(0, y2), x, y);
		}
		else{
			relax(make_pair(x1, 0), make_pair(x2, y2), x, y);
			relax(make_pair(0, y1), make_pair(x2, y2), x, y);
		}
	}
	else{
		if(x2<0 && 0<y2){
			relax(make_pair(x1, y1), make_pair(x2, 0), x, y);
			relax(make_pair(x1, y1), make_pair(0, y2), x, y);
		}
		else{
			relax(make_pair(x1, y1), make_pair(x2, y2), x, y);
		}
	}
	return make_pair(x, y);
}
bool judge(double a, double b, double c, double d, double t){
	pdd x = mul(make_pair(a-t, a+t), make_pair(d-t, d+t));
	pdd y = mul(make_pair(b-t, b+t), make_pair(c-t, c+t));
	return !(x.first>y.second || y.first>x.second);
}
int main()
{
	// freopen("in.txt", "r", stdin);
	int a, b, c, d;
	while(4==scanf("%d%d%d%d", &a, &b, &c, &d)){
		double lo = 0.0, hi = 1e9;
		while(lo+1e-10<hi){
			double m = (lo+hi)/2;
			if(judge(a, b, c, d, m))	hi = m;
			else	lo = m;
		}
		if(judge(a, b, c, d, lo))	printf("%f\n", lo);
		else	printf("%.10f\n", hi);
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
void range(double a, double b, double c, double d, double &x, double &y){
    vector<double> t;
    t.push_back(a*c);
    t.push_back(a*d);
    t.push_back(b*c);
    t.push_back(b*d);
    sort(t.begin(), t.end());
    x = t[0];
    y = t[3];
}
bool judge(double a, double b, double c, double d, double t){
    double x1, y1, x2, y2;
    range(a-t, a+t, d-t, d+t, x1, y1);
    range(b-t, b+t, c-t, c+t, x2, y2);
    return !(x1>y2 || x2>y1);
}
int main()
{
    // freopen("in.txt", "r", stdin);
    int a, b, c, d;
    while(4==scanf("%d%d%d%d", &a, &b, &c, &d)){
        double lo = 0.0, hi = 1e9;
        for(int i=0; i<200; i++){
            double m = (lo+hi) * 0.5;
            if(judge(a, b, c, d, m))    hi = m;
            else    lo = m;
        }
        printf("%.11f\n", (lo+hi)*0.5);
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<double, double> pdd;
const ll oo = 1e10;
void relax(pdd a, pdd b, double &left, double &right){
	double x = a.first * b.first;
	double y = a.second * b.second;
	double z = a.first * b.second;
	double w = a.second * b.first;
	double mi = min(min(x, y), min(w, z));
	double ma = max(max(x, y), max(w, z));
	left = min(mi, x);
	right = max(ma, y);
}
pdd mul(pdd a, pdd b){
	double x1 = a.first;
	double y1 = a.second;
	double x2 = b.first;
	double y2 = b.second;
	double x = oo, y = -oo;
	if(x1<0 && 0<y1){
		if(x2<0 && 0<y2){
			relax(make_pair(x1, 0), make_pair(x2, 0), x, y);
			relax(make_pair(x1, 0), make_pair(0, y2), x, y);
			relax(make_pair(0, y1), make_pair(x2, 0), x, y);
			relax(make_pair(0, y1), make_pair(0, y2), x, y);
		}
		else{
			relax(make_pair(x1, 0), make_pair(x2, y2), x, y);
			relax(make_pair(0, y1), make_pair(x2, y2), x, y);
		}
	}
	else{
		if(x2<0 && 0<y2){
			relax(make_pair(x1, y1), make_pair(x2, 0), x, y);
			relax(make_pair(x1, y1), make_pair(0, y2), x, y);
		}
		else{
			relax(make_pair(x1, y1), make_pair(x2, y2), x, y);
		}
	}
	// printf("%f %f %f %f %f %f\n", x1, y1, x2, y2, x, y);
	return make_pair(x, y);
}
bool judge(double a, double b, double c, double d, double t){
	pdd x = mul(make_pair(a-t, a+t), make_pair(d-t, d+t));
	pdd y = mul(make_pair(b-t, b+t), make_pair(c-t, c+t));
	return !(x.first>y.second || y.first>x.second);
}
int main()
{
	// freopen("in.txt", "r", stdin);
	int a, b, c, d;
	while(4==scanf("%d%d%d%d", &a, &b, &c, &d)){
		double lo = 0.0, hi = 1e9;
		while(lo+1e-10<hi){
			double m = (lo+hi)/2;
			if(judge(a, b, c, d, m))	hi = m;
			else	lo = m;
		}
		if(judge(a, b, c, d, lo))	printf("%f\n", lo);
		else	printf("%.10f\n", hi);
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
void range(double a, double b, double c, double d, double &x, double &y){
    vector<double> t;
    t.push_back(a*c);
    t.push_back(a*d);
    t.push_back(b*c);
    t.push_back(b*d);
    sort(t.begin(), t.end());
    x = t[0];
    y = t[3];
}
bool judge(double a, double b, double c, double d, double t){
    double x1, y1, x2, y2;
    range(a-t, a+t, d-t, d+t, x1, y1);
    range(b-t, b+t, c-t, c+t, x2, y2);
    return !(x1>y2 || x2>y1);
}
int main()
{
    // freopen("in.txt", "r", stdin);
    int a, b, c, d;
    while(4==scanf("%d%d%d%d", &a, &b, &c, &d)){
        double lo = 0.0, hi = 1e9;
        for(int i=0; i<80; i++){
            double m = (lo+hi) * 0.5;
            if(judge(a, b, c, d, m))    hi = m;
            else    lo = m;
        }
        printf("%.11f\n", (lo+hi)*0.5);
    }
    return 0;
}


//Bismillahir Rahmanir Rahim
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cctype>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstring>
#include <queue>
#include <set>
#include <stack>
#include <map>
#include <sstream>

using namespace std;

const double eps = 1e-10;

int main()
{
    double a, b, c, d;
    while(cin >> a >> b >> c >> d) {
        if(a * d == b * c) {
            puts("0");
            continue;
        }
        int l = 0;
        if(a * d > b * c) {
            l = 1;
        }
        double hi = 1e9 + 2, low = 0, ret = 2e9;
        for(int i = 0; i <= 10000; ++i) {
            double mid = (hi + low) / 2.0, x, y;
            bool s = 0;
            if(l) {
                if((a - mid) * (d - mid) <= (c + mid) * (b + mid)) {
                    s = 1;
                }
            } else {
                if((a + mid) * (d + mid) >= (c - mid) * (b - mid)) {
                    s = 1;
                }
            }
            if(s) {
                hi = mid - eps;
                ret = min(ret, mid);
            } else {
                low = mid + eps;
            }
        }
        printf("%.9lf\n", ret);
    }
    return 0;
}


//Bismillahir Rahmanir Rahim
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cctype>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstring>
#include <queue>
#include <set>
#include <stack>
#include <map>
#include <sstream>

using namespace std;

const double eps = 1e-10;

int main()
{
    double a, b, c, d;
    while(cin >> a >> b >> c >> d) {
        if(a * d == b * c) {
            puts("0");
            continue;
        }
        int l = 0;
        if(a * d > b * c) {
            l = 1;
        }
        double hi = 1e9 + 2, low = 0, ret = 2e9;
        for(int i = 0; i <= 10000; ++i) {
            double mid = (hi + low + (eps * eps)) / 2.0, x, y;
            bool s = 0;
            if(l) {
                if((a - mid) * (d - mid) <= (c + mid) * (b + mid)) {
                    s = 1;
                }
            } else {
                if((a + mid) * (d + mid) >= (c - mid) * (b - mid)) {
                    s = 1;
                }
            }
            if(s) {
                hi = mid - eps;
                ret = min(ret, mid);
            } else {
                low = mid + eps;
            }
        }
        printf("%.9lf\n", ret);
    }
    return 0;
}


//Bismillahir Rahmanir Rahim
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cctype>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstring>
#include <queue>
#include <set>
#include <stack>
#include <map>
#include <sstream>

using namespace std;

const double eps = 1e-10;

double mul(double m, double n, double inc, double fl)
{
    double ret = fl ? -2e9 : 2e9;
    for(int i = -1; i < 2; i += 2) {
        for(int j = -1; j < 2; j += 2) {
            ret = fl ? max(ret, (n + i * inc) * (m + j * inc)) : min(ret, (n + i * inc) * (m + j * inc));
        }
    }
    return ret;
}

int main()
{
    double a, b, c, d;
    while(cin >> a >> b >> c >> d) {
        int l = 0;
        if(a * d > b * c) {
            l = 1;
        }
        double hi = 1e9 + 2, low = 0, ret = 2e9;
        for(int i = 0; i <= 10000; ++i) {
            double mid = (hi + low) / 2.0;
            bool s = 0;
            double pmid = mid, nmid = -mid;
            if(l) {
                if(mul(a, d, mid, 0) <= mul(b, c, mid, 1)) {
                    s = 1;
                }
            } else {
                if(mul(a, d, mid, 1) >= mul(b, c, mid, 0)) {
                    s = 1;
                }
            }
            if(s) {
                hi = mid - eps;
                ret = min(ret, mid);
            } else {
                low = mid + eps;
            }
        }
        printf("%.9lf\n", ret);
    }
    return 0;
}


//Bismillahir Rahmanir Rahim
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cctype>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstring>
#include <queue>
#include <set>
#include <stack>
#include <map>
#include <sstream>

using namespace std;

const double eps = 1e-10;

double mul(double m, double n, double inc, double fl)
{
    double ret = fl ? -2e18 : 2e18;
    for(int i = -1; i < 2; i += 2) {
        for(int j = -1; j < 2; j += 2) {
            ret = fl ? max(ret, (n + i * inc) * (m + j * inc)) : min(ret, (n + i * inc) * (m + j * inc));
        }
    }
    return ret;
}

int main()
{
    double a, b, c, d;
    while(cin >> a >> b >> c >> d) {
        int l = 0;
        if(a * d > b * c) {
            l = 1;
        }
        double hi = 1e9 + 2, low = 0, ret = 2e9;
        for(int i = 0; i <= 10000; ++i) {
            double mid = (hi + low) / 2.0;
            bool s = 0;
            if(l) {
                if(mul(a, d, mid, 0) <= mul(b, c, mid, 1)) {
                    s = 1;
                }
            } else {
                if(mul(a, d, mid, 1) >= mul(b, c, mid, 0)) {
                    s = 1;
                }
            }
            if(s) {
                hi = mid - eps;
                ret = min(ret, mid);
            } else {
                low = mid + eps;
            }
        }
        printf("%.9lf\n", ret);
    }
    return 0;
}


//Bismillahir Rahmanir Rahim
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cctype>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstring>
#include <queue>
#include <set>
#include <stack>
#include <map>
#include <sstream>

using namespace std;

const double eps = 1e-10;

int main()
{
    double a, b, c, d;
    while(cin >> a >> b >> c >> d) {
        if(a * d == b * c) {
            puts("0");
            continue;
        }
        int l = 0;
        if(a * d > b * c) {
            l = 1;
        }
        double hi = 1e9 + 2, low = 0, ret = 2e9;
        for(int i = 0; i <= 1000; ++i) {
            double mid = (hi + low + (eps * eps)) / 2.0, x, y;
            bool s = 0;
            if(l) {
                if((a - mid) * (d - mid) <= (c + mid) * (b + mid)) {
                    s = 1;
                }
            } else {
                if((a + mid) * (d + mid) >= (c - mid) * (b - mid)) {
                    s = 1;
                }
            }
            if(s) {
                hi = mid - eps;
                ret = min(ret, mid);
            } else {
                low = mid + eps;
            }
        }
        printf("%.9lf\n", ret);
    }
    return 0;
}


//Bismillahir Rahmanir Rahim
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cctype>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstring>
#include <queue>
#include <set>
#include <stack>
#include <map>
#include <sstream>

using namespace std;

const double eps = 1e-9;

int main()
{
    double a, b, c, d;
    while(cin >> a >> b >> c >> d) {
        if(a * d == b * c) {
            puts("0");
            continue;
        }
        int l = 0;
        if(a * d > b * c) {
            l = 1;
        }
        double hi = 1e9 + 2, low = 0, ret = 2e9;
        for(int i = 0; i <= 1000; ++i) {
            double mid = (hi + low + (eps * eps)) / 2.0, x, y;
            bool s = 0;
            if(l) {
                if((a - mid) * (d - mid) <= (c + mid) * (b + mid)) {
                    s = 1;
                }
            } else {
                if((a + mid) * (d + mid) >= (c - mid) * (b - mid)) {
                    s = 1;
                }
            }
            if(s) {
                hi = mid - eps;
                ret = min(ret, mid);
            } else {
                low = mid + eps;
            }
        }
        printf("%.9f\n", ret);
    }
    return 0;
}


//Bismillahir Rahmanir Rahim
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cctype>
#include <cstdlib>
#include <vector>
#include <string>
#include <cstring>
#include <queue>
#include <set>
#include <stack>
#include <map>
#include <sstream>

using namespace std;

const double eps = 1e-9;

int main()
{
    int a, b, c, d;
    while(cin >> a >> b >> c >> d) {
        if(a * d == b * c) {
            puts("0");
            continue;
        }
        int l = 0;
        if(a * d > b * c) {
            l = 1;
        }
        double hi = 1e9 + 2, low = 0, ret = 1e9;
        while(fabs(hi - low) > eps) {
            double mid = (hi + low) / 2.0, x, y;
            bool s = 0;
            if(l) {
                if((a - mid) * (d - mid) <= (c + mid) * (b + mid)) {
                    s = 1;
                }
            } else {
                if((a + mid) * (d + mid) >= (c - mid) * (b - mid)) {
                    s = 1;
                }
            }
            if(s) {
                hi = mid;
                ret = min(ret, hi);
            } else {
                low = mid;
            }
        }
        printf("%.9lf\n", ret);
    }
    return 0;
}


#include <iostream>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>

using namespace std;
#define LL long long
#define pii pair<int,int>

const int INF = 0x3f3f3f3f;
const double eps = 1e-10;

double a[4];

pair<double,double> getv(double aa[2],double bb[2]){
    pair<double,double> x;
    if(aa[0] < 0 && aa[1] < 0){
        if(bb[0] < 0 && bb[1] < 0){
            x.second = aa[0] * bb[0];
            x.first = aa[1] * bb[1];
        }
        else if(bb[0] < 0 && bb[1] >= 0){
            x.second = aa[0] * bb[0];
            x.first = aa[0] * bb[1];
        }
        else {
            x.second = aa[1] * bb[0];
            x.first = aa[0] * bb[1];
        }
    }
    else if(aa[0] < 0 && aa[1] >= 0){
        if(bb[0] < 0 && bb[1] < 0){
            x.second = aa[0] * bb[0];
            x.first = aa[1] * bb[0];
        }
        else if(bb[0] < 0 && bb[1] >= 0){
            x.second = max(bb[0] * aa[0] , aa[1] * bb[1]);
            x.first = min(aa[0] * bb[1] , aa[1] * bb[0]);
        }
        else {
            x.second = aa[1] * bb[1];
            x.first = aa[0] * bb[1];
        }
    }
    else {
        if(bb[0] < 0 && bb[1] < 0){
            x.second = aa[1] * bb[0];
            x.first = aa[0] * bb[1];
        }
        else if(bb[0] < 0 && bb[1] >= 0){
            x.second = aa[1] * bb[1];
            x.first = aa[1] * bb[0];
        }
        else {
            x.second = aa[1] * bb[1];
            x.first = aa[0] * bb[0];
        }
    }
    return x;
}

bool check(double mid){
    double x[4][2];
    for(int i = 0; i < 4; ++i){
        x[i][0] = a[i] - mid; x[i][1] = a[i] + mid;
        if(x[i][0] - x[i][1] > eps) swap(x[i][0],x[i][1]);
    }
    bool ok = 0;
    pair<double,double> xx = getv(x[0],x[3]) , yy = getv(x[1],x[2]);
    if(xx.first - yy.first > eps) swap(xx,yy);
    if(xx.second - yy.first > eps) ok = 1;
    return ok;
}

int main(){
    cin >> a[0] >> a[1];
    cin >> a[2] >> a[3];
    double l = 0 , r = 1e9 , lmid = -1;
    while(r - l >= eps){
        double mid = (l + r) / 2;
        if(mid - lmid <= eps) { l = lmid; break; }
        if(check(mid)) r = mid;
        else l = mid;
        lmid = mid;
    }
    printf("%.9lf\n",l);
    return 0;
}


#include <iostream>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>

using namespace std;
#define LL long long
#define pii pair<int,int>

const int INF = 0x3f3f3f3f;
const long double eps = 1e-10;

long double a[4];

pair<long double,long double> getv(long double aa[2],long double bb[2]){
    /*pair<long double,long double> x;
    if(aa[0] < -eps && aa[1] < -eps){
        if(bb[0] < -eps && bb[1] < -eps){
            x.second = aa[0] * bb[0];
            x.first = aa[1] * bb[1];
        }
        else if(bb[0] < -eps && bb[1] > -eps){
            x.second = aa[0] * bb[0];
            x.first = aa[0] * bb[1];
        }
        else {
            x.second = aa[1] * bb[0];
            x.first = aa[0] * bb[1];
        }
    }
    else if(aa[0] < -eps && aa[1] > -eps){
        if(bb[0] < -eps && bb[1] < -eps){
            x.second = aa[0] * bb[0];
            x.first = aa[1] * bb[0];
        }
        else if(bb[0] < -eps && bb[1] > -eps){
            x.second = bb[0] * aa[0] - aa[1] * bb[1] > eps ? bb[0] * aa[0] : aa[1] * bb[1];
            x.first =  aa[1] * bb[0] - aa[0] * bb[1] > eps ? aa[0] * bb[1] : aa[1] * bb[0];
        }
        else {
            x.second = aa[1] * bb[1];
            x.first = aa[0] * bb[1];
        }
    }
    else {
        if(bb[0] < -eps && bb[1] < -eps){
            x.second = aa[1] * bb[0];
            x.first = aa[0] * bb[1];
        }
        else if(bb[0] < -eps && bb[1] > -eps){
            x.second = aa[1] * bb[1];
            x.first = aa[1] * bb[0];
        }
        else {
            x.second = aa[1] * bb[1];
            x.first = aa[0] * bb[0];
        }
    }
    if(x.first - x.second > eps) swap(x.first,x.second);*/
    vector<long double> z;
    z.push_back(aa[0]*bb[0]);
    z.push_back(aa[0]*bb[1]);
    z.push_back(aa[1]*bb[0]);
    z.push_back(aa[1]*bb[1]);
    sort(z.begin(),z.end());
    return make_pair(z[0],z[3]);
    //return x;
}

bool check(long double mid){
    long double x[4][2];
    for(int i = 0; i < 4; ++i){
        x[i][0] = a[i] - mid; x[i][1] = a[i] + mid;
        if(x[i][0] > x[i][1]) swap(x[i][0],x[i][1]);
    }
    bool ok = 0;
    pair<long double,long double> xx = getv(x[0],x[3]) , yy = getv(x[1],x[2]);
    if(xx.first > yy.first) swap(xx,yy);
    if(xx.second > yy.first) ok = 1;
    return ok;
}

int main(){
    cin >> a[0] >> a[1];
    cin >> a[2] >> a[3];
    long double l = 0.0 , r = 2e9;
    while(r - l > eps){
        long double mid = (l + r) / 2;
        if(check(mid)) r = mid;
        else l = mid;
    }
    printf("%.10f\n",(double)(l+r)/2);
    return 0;
}
/*
-1000000000 0
0 1000000000
*/


#include <iostream>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>

using namespace std;
#define LL long long
#define pii pair<int,int>

const int INF = 0x3f3f3f3f;
const double eps = 1e-10;

double a[4];

pair<double,double> getv(double aa[2],double bb[2]){
    pair<double,double> x;
    if(aa[0] < eps && aa[1] < eps){
        if(bb[0] < eps && bb[1] < eps){
            x.second = aa[0] * bb[0];
            x.first = aa[1] * bb[1];
        }
        else if(bb[0] < eps && bb[1] >= eps){
            x.second = aa[0] * bb[0];
            x.first = aa[0] * bb[1];
        }
        else {
            x.second = aa[1] * bb[0];
            x.first = aa[0] * bb[1];
        }
    }
    else if(aa[0] < eps && aa[1] >= eps){
        if(bb[0] < eps && bb[1] < eps){
            x.second = aa[0] * bb[0];
            x.first = aa[1] * bb[0];
        }
        else if(bb[0] < eps && bb[1] >= eps){
            x.second = max(bb[0] * aa[0] , aa[1] * bb[1]);
            x.first = min(aa[0] * bb[1] , aa[1] * bb[0]);
        }
        else {
            x.second = aa[1] * bb[1];
            x.first = aa[0] * bb[1];
        }
    }
    else {
        if(bb[0] < eps && bb[1] < eps){
            x.second = aa[1] * bb[0];
            x.first = aa[0] * bb[1];
        }
        else if(bb[0] < eps && bb[1] >= eps){
            x.second = aa[1] * bb[1];
            x.first = aa[1] * bb[0];
        }
        else {
            x.second = aa[1] * bb[1];
            x.first = aa[0] * bb[0];
        }
    }
    return x;
}

bool check(double mid){
    double x[4][2];
    for(int i = 0; i < 4; ++i){
        x[i][0] = a[i] - mid; x[i][1] = a[i] + mid;
        if(x[i][0] - x[i][1] > eps) swap(x[i][0],x[i][1]);
    }
    bool ok = 0;
    pair<double,double> xx = getv(x[0],x[3]) , yy = getv(x[1],x[2]);
    if(xx.first - yy.first > eps) swap(xx,yy);
    if(xx.second - yy.first > eps) ok = 1;
    return ok;
}

int main(){
    cin >> a[0] >> a[1];
    cin >> a[2] >> a[3];
    double l = 0 , r = 1e9 , lmid = -1;
    while(r - l >= eps){
        double mid = (l + r) / 2;
        if(abs(mid - lmid) <= eps) { l = lmid; break; }
        if(check(mid)) r = mid;
        else l = mid;
        lmid = mid;
    }
    printf("%.9lf\n",l);
    return 0;
}
/*
-1000000000 0
0 1000000000
*/


#include <iostream>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>

using namespace std;
#define LL long long
#define pii pair<int,int>

const int INF = 0x3f3f3f3f;
const double eps = 1e-10;

double a[4];

pair<double,double> getv(double aa[2],double bb[2]){
    pair<double,double> x;
    if(aa[0] < 0 && aa[1] < 0){
        if(bb[0] < 0 && bb[1] < 0){
            x.second = aa[0] * bb[0];
            x.first = aa[1] * bb[1];
        }
        else if(bb[0] < 0 && bb[1] >= 0){
            x.second = aa[0] * bb[0];
            x.first = aa[0] * bb[1];
        }
        else {
            x.second = aa[1] * bb[0];
            x.first = aa[0] * bb[1];
        }
    }
    else if(aa[0] < 0 && aa[1] >= 0){
        if(bb[0] < 0 && bb[1] < 0){
            x.second = aa[0] * bb[0];
            x.first = aa[1] * bb[0];
        }
        else if(bb[0] < 0 && bb[1] >= 0){
            x.second = max(bb[0] * aa[0] , aa[1] * bb[1]);
            x.first = min(aa[0] * bb[1] , aa[1] * bb[0]);
        }
        else {
            x.second = aa[1] * bb[1];
            x.first = aa[0] * bb[1];
        }
    }
    else {
        if(bb[0] < 0 && bb[1] < 0){
            x.second = aa[1] * bb[0];
            x.first = aa[0] * bb[1];
        }
        else if(bb[0] < 0 && bb[1] >= 0){
            x.second = aa[1] * bb[1];
            x.first = aa[1] * bb[0];
        }
        else {
            x.second = aa[1] * bb[1];
            x.first = aa[0] * bb[0];
        }
    }
    return x;
}

bool check(double mid){
    double x[4][2];
    for(int i = 0; i < 4; ++i){
        x[i][0] = a[i] - mid , x[i][1] = a[i] + mid;
        if(x[i][0] > x[i][1]) swap(x[i][0],x[i][1]);
    }
    bool ok = 0;
    pair<double,double> xx = getv(x[0],x[3]) , yy = getv(x[1],x[2]);
    if(xx > yy) swap(xx,yy);
    if(xx.second >= yy.first) ok = 1;
    return ok;
}

int main(){
    cin >> a[0] >> a[1];
    cin >> a[2] >> a[3];
    double l = 0 , r = 1e9 , lmid = -1;
    while(r - l > eps){
        double mid = (l + r) / 2;
        if(mid == lmid) { l = lmid; break; }
        if(check(mid)) r = mid;
        else l = mid;
        lmid = mid;
    }
    printf("%.9lf\n",l);
    return 0;
}


#include <iostream>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>

using namespace std;
#define LL long long
#define pii pair<int,int>

const int INF = 0x3f3f3f3f;
const double eps = 1e-10;

double a[4];

pair<double,double> getv(double aa[2],double bb[2]){
    pair<double,double> x;
    if(aa[0] < 0 && aa[1] < 0){
        if(bb[0] < 0 && bb[1] < 0){
            x.second = aa[0] * bb[0];
            x.first = aa[1] * bb[1];
        }
        else if(bb[0] < 0 && bb[1] >= 0){
            x.second = aa[0] * bb[0];
            x.first = aa[0] * bb[1];
        }
        else {
            x.second = aa[1] * bb[0];
            x.first = aa[0] * bb[1];
        }
    }
    else if(aa[0] < 0 && aa[1] >= 0){
        if(bb[0] < 0 && bb[1] < 0){
            x.second = aa[0] * bb[0];
            x.first = aa[1] * bb[0];
        }
        else if(bb[0] < 0 && bb[1] >= 0){
            x.second = max(bb[0] * aa[0] , aa[1] * bb[1]);
            x.first = min(aa[0] * bb[1] , aa[1] * bb[0]);
        }
        else {
            x.second = aa[1] * bb[1];
            x.first = aa[0] * bb[1];
        }
    }
    else {
        if(bb[0] < 0 && bb[1] < 0){
            x.second = aa[1] * bb[0];
            x.first = aa[0] * bb[1];
        }
        else if(bb[0] < 0 && bb[1] >= 0){
            x.second = aa[1] * bb[1];
            x.first = aa[1] * bb[0];
        }
        else {
            x.second = aa[1] * bb[1];
            x.first = aa[0] * bb[0];
        }
    }
    return x;
}

bool check(double mid){
    double x[4][2];
    for(int i = 0; i < 4; ++i){
        x[i][0] = a[i] - mid , x[i][1] = a[i] + mid;
        if(x[i][0] > x[i][1]) swap(x[i][0],x[i][1]);
    }
    bool ok = 0;
    pair<double,double> xx = getv(x[0],x[3]) , yy = getv(x[1],x[2]);
    if(xx > yy) swap(xx,yy);
    if(xx.second >= yy.first) ok = 1;
    return ok;
}

int main(){
    cin >> a[0] >> a[1];
    cin >> a[2] >> a[3];
    double l = 0 , r = 1e9;
    while(r - l > eps){
        double mid = (l + r) / 2;
        if(mid == r) { l = r; break; }
        if(check(mid)) r = mid;
        else l = mid;
    }
    printf("%.9lf\n",l);
    return 0;
}


#include <iostream>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>

using namespace std;
#define LL long long
#define pii pair<int,int>

const int INF = 0x3f3f3f3f;
const long double eps = 1e-10;

long double a[4];

pair<long double,long double> getv(long double aa[2],long double bb[2]){
    pair<long double,long double> x;
    if(aa[0] < 0 && aa[1] < 0){
        if(bb[0] < 0 && bb[1] < 0){
            x.second = aa[0] * bb[0];
            x.first = aa[1] * bb[1];
        }
        else if(bb[0] < 0 && bb[1] >= 0){
            x.second = aa[0] * bb[0];
            x.first = aa[0] * bb[1];
        }
        else {
            x.second = aa[1] * bb[0];
            x.first = aa[0] * bb[1];
        }
    }
    else if(aa[0] < 0 && aa[1] >= 0){
        if(bb[0] < 0 && bb[1] < 0){
            x.second = aa[0] * bb[0];
            x.first = aa[1] * bb[0];
        }
        else if(bb[0] < 0 && bb[1] > 0){
            x.second = max(bb[0] * aa[0] , aa[1] * bb[1]);
            x.first =  min(aa[1] * bb[0] , aa[0] * bb[1]);
        }
        else {
            x.second = aa[1] * bb[1];
            x.first = aa[0] * bb[1];
        }
    }
    else {
        if(bb[0] < 0 && bb[1] < 0){
            x.second = aa[1] * bb[0];
            x.first = aa[0] * bb[1];
        }
        else if(bb[0] < 0 && bb[1] >= 0){
            x.second = aa[1] * bb[1];
            x.first = aa[1] * bb[0];
        }
        else {
            x.second = aa[1] * bb[1];
            x.first = aa[0] * bb[0];
        }
    }
    if(x.first > x.second) swap(x.first,x.second);
    /*vector<long double> z;
    z.push_back(aa[0]*bb[0]);
    z.push_back(aa[0]*bb[1]);
    z.push_back(aa[1]*bb[0]);
    z.push_back(aa[1]*bb[1]);
    sort(z.begin(),z.end());
    return make_pair(z[0],z[3]);*/
    return x;
}

bool check(long double mid){
    long double x[4][2];
    for(int i = 0; i < 4; ++i){
        x[i][0] = a[i] - mid; x[i][1] = a[i] + mid;
        if(x[i][0] > x[i][1]) swap(x[i][0],x[i][1]);
    }
    bool ok = 0;
    pair<long double,long double> xx = getv(x[0],x[3]) , yy = getv(x[1],x[2]);
    if(xx.first > yy.first) swap(xx,yy);
    if(xx.second > yy.first) ok = 1;
    return ok;
}

int main(){
    cin >> a[0] >> a[1];
    cin >> a[2] >> a[3];
    long double l = 0.0 , r = 2e9;
    while(r - l > eps){
        long double mid = (l + r) / 2;
        if(check(mid)) r = mid;
        else l = mid;
    }
    printf("%.10f\n",(double)(l+r)/2);
    return 0;
}
/*
-1000000000 0
0 1000000000
*/


#include <iostream>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>

using namespace std;
#define LL long long
#define pii pair<int,int>

const int INF = 0x3f3f3f3f;
const double eps = 1e-10;

double a[4];

pair<double,double> getv(double aa[2],double bb[2]){
    pair<double,double> x;
    if(aa[0] < 0 && aa[1] < 0){
        if(bb[0] < 0 && bb[1] < 0){
            x.second = aa[0] * bb[0];
            x.first = aa[1] * bb[1];
        }
        else if(bb[0] < 0 && bb[1] >= 0){
            x.second = aa[0] * bb[0];
            x.first = aa[0] * bb[1];
        }
        else {
            x.second = aa[1] * bb[0];
            x.first = aa[0] * bb[1];
        }
    }
    else if(aa[0] < 0 && aa[1] >= 0){
        if(bb[0] < 0 && bb[1] < 0){
            x.second = aa[0] * bb[0];
            x.first = aa[1] * bb[0];
        }
        else if(bb[0] < 0 && bb[1] >= 0){
            x.second = max(bb[0] * aa[0] , aa[1] * bb[1]);
            x.first = min(aa[0] * bb[1] , aa[1] * bb[0]);
        }
        else {
            x.second = aa[1] * bb[1];
            x.first = aa[0] * bb[1];
        }
    }
    else {
        if(bb[0] < 0 && bb[1] < 0){
            x.second = aa[1] * bb[0];
            x.first = aa[0] * bb[1];
        }
        else if(bb[0] < 0 && bb[1] >= 0){
            x.second = aa[1] * bb[1];
            x.first = aa[1] * bb[0];
        }
        else {
            x.second = aa[1] * bb[1];
            x.first = aa[0] * bb[0];
        }
    }
    return x;
}

bool check(double mid){
    double x[4][2];
    for(int i = 0; i < 4; ++i){
        x[i][0] = a[i] - mid , x[i][1] = a[i] + mid;
        if(x[i][0] > x[i][1]) swap(x[i][0],x[i][1]);
    }
    bool ok = 0;
    pair<double,double> xx = getv(x[0],x[3]) , yy = getv(x[1],x[2]);
    if(xx > yy) swap(xx,yy);
    if(xx.second >= yy.first) ok = 1;
    return ok;
}

int main(){
    cin >> a[0] >> a[1];
    cin >> a[2] >> a[3];
    double l = 0 , r = 1e9;
    while(r - l > eps){
        double mid = (l + r) / 2;
        if(check(mid)) r = mid;
        else l = mid;
    }
    printf("%.9lf\n",l);
    return 0;
}


#include <iostream>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>

using namespace std;
#define LL long long
#define pii pair<int,int>

const int INF = 0x3f3f3f3f;
const double eps = 1e-10;

double a[4];

pair<double,double> getv(double aa[2],double bb[2]){
    pair<double,double> x;
    if(aa[0] < -eps && aa[1] < -eps){
        if(bb[0] < -eps && bb[1] < -eps){
            x.second = aa[0] * bb[0];
            x.first = aa[1] * bb[1];
        }
        else if(bb[0] < -eps && bb[1] > -eps){
            x.second = aa[0] * bb[0];
            x.first = aa[0] * bb[1];
        }
        else {
            x.second = aa[1] * bb[0];
            x.first = aa[0] * bb[1];
        }
    }
    else if(aa[0] < -eps && aa[1] > -eps){
        if(bb[0] < -eps && bb[1] < -eps){
            x.second = aa[0] * bb[0];
            x.first = aa[1] * bb[0];
        }
        else if(bb[0] < -eps && bb[1] > -eps){
            x.second = bb[0] * aa[0] - aa[1] * bb[1] > eps ? bb[0] * aa[0] : aa[1] * bb[1];
            x.first =  aa[1] * bb[0] - aa[0] * bb[1] > eps ? aa[0] * bb[1] : aa[1] * bb[0];
        }
        else {
            x.second = aa[1] * bb[1];
            x.first = aa[0] * bb[1];
        }
    }
    else {
        if(bb[0] < -eps && bb[1] < -eps){
            x.second = aa[1] * bb[0];
            x.first = aa[0] * bb[1];
        }
        else if(bb[0] < -eps && bb[1] > -eps){
            x.second = aa[1] * bb[1];
            x.first = aa[1] * bb[0];
        }
        else {
            x.second = aa[1] * bb[1];
            x.first = aa[0] * bb[0];
        }
    }
    if(x.first - x.second > eps) swap(x.first,x.second);
    return x;
}

bool check(double mid){
    double x[4][2];
    for(int i = 0; i < 4; ++i){
        x[i][0] = a[i] - mid; x[i][1] = a[i] + mid;
        if(x[i][0] - x[i][1] > eps) swap(x[i][0],x[i][1]);
    }
    bool ok = 0;
    pair<double,double> xx = getv(x[0],x[3]) , yy = getv(x[1],x[2]);
    if(xx.first - yy.first > eps) swap(xx,yy);
    if(xx.second - yy.first > -eps) ok = 1;
    return ok;
}

int main(){
    cin >> a[0] >> a[1];
    cin >> a[2] >> a[3];
    double l = 0 , r = 1e10 , lmid = -1;
    while(r - l > -eps){
        double mid = (l + r) / 2;
        if(abs(mid - lmid) < eps) { l = r; break; }
        if(check(mid)) r = mid;
        else l = mid;
        lmid = mid;
    }
    printf("%.9lf\n",l+eps);
    return 0;
}
/*
-1000000000 0
0 1000000000
*/


#include <iostream>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>

using namespace std;
#define LL long long
#define pii pair<int,int>

const int INF = 0x3f3f3f3f;
const double eps = 1e-10;

double a[4];

pair<double,double> getv(double aa[2],double bb[2]){
    pair<double,double> x;
    if(aa[0] < 0 && aa[1] < 0){
        if(bb[0] < 0 && bb[1] < 0){
            x.second = aa[0] * bb[0];
            x.first = aa[1] * bb[1];
        }
        else if(bb[0] < 0 && bb[1] >= 0){
            x.second = aa[0] * bb[0];
            x.first = aa[0] * bb[1];
        }
        else {
            x.second = aa[1] * bb[0];
            x.first = aa[0] * bb[1];
        }
    }
    else if(aa[0] < 0 && aa[1] >= 0){
        if(bb[0] < 0 && bb[1] < 0){
            x.second = aa[0] * bb[0];
            x.first = aa[1] * bb[0];
        }
        else if(bb[0] < 0 && bb[1] >= 0){
            x.second = max(bb[0] * aa[0] , aa[1] * bb[1]);
            x.first = min(aa[0] * bb[1] , aa[1] * bb[0]);
        }
        else {
            x.second = aa[1] * bb[1];
            x.first = aa[0] * bb[1];
        }
    }
    else {
        if(bb[0] < 0 && bb[1] < 0){
            x.second = aa[1] * bb[0];
            x.first = aa[0] * bb[1];
        }
        else if(bb[0] < 0 && bb[1] >= 0){
            x.second = aa[1] * bb[1];
            x.first = aa[1] * bb[0];
        }
        else {
            x.second = aa[1] * bb[1];
            x.first = aa[0] * bb[0];
        }
    }
    return x;
}

bool check(double mid){
    double x[4][2];
    for(int i = 0; i < 4; ++i){
        x[i][0] = a[i] - mid , x[i][1] = a[i] + mid;
        if(x[i][0] > x[i][1]) swap(x[i][0],x[i][1]);
    }
    bool ok = 0;
    pair<double,double> xx = getv(x[0],x[3]) , yy = getv(x[1],x[2]);
    if(xx > yy) swap(xx,yy);
    if(xx.second >= yy.first) ok = 1;
    return ok;
}

int main(){
    cin >> a[0] >> a[1];
    cin >> a[2] >> a[3];
    double l = 0 , r = 1e9 , lmid = (l + r) / 2;
    while(r - l > eps){
        double mid = (l + r) / 2;
        if(mid == lmid) { l = lmid; break; }
        if(check(mid)) r = mid;
        else l = mid;
        lmid = mid;
    }
    printf("%.9lf\n",l);
    return 0;
}


// GSKHIRTLADZE

#include<bits/stdc++.h>

#define fi first
#define se second
#define pb push_back
#define mk make_pair
#define Pii pair < int , int >
#define tree int t,int l,int r
#define left 2*t,l,(l+r)/2
#define right 2*t+1,(l+r)/2+1,r
#define f_sum(i,r) for (int i=r;i>=0;i=(i&(i+1))-1)
#define f_upd(i,r) for (;i<=r;i=(i|(i+1)))
#define ged(x) scanf("%I64d",&x)
#define getcx getchar
#define LL long long
#define INF 1000000000
#define eps 0.0000000001
#define P7 1000000007
#define N5 262145
#define N6 1048577
#define SS system("pause")

using namespace std;

inline void inp(int &n);
LL gcd(LL A,LL B),lcm(LL A,LL B),pow(LL A,LL B,LL P);
vector <int> z_function (string s);
/*/int PR[N5],SZ[N5],parent(int u);void uni(int u,int v);/**/
/*/int lp[N6+2];vector < int > pr;void get_pr(int N);/**/

double a,b,c,d,A,B,C,D,m,L,R,ans;
int t;

main() {
   cin>>a>>b>>c>>d;
   double L=0,R=1000000000.00;
   t=50;
   while (t > 0)
    {t--;
     m=(L+R)/2;
     A=min ( min((a-m)*(d-m),(a+m)*(d-m)) , min((a-m)*(d+m),(a+m)*(d+m)) );
     B=max ( max((a-m)*(d-m),(a+m)*(d-m)) , max((a-m)*(d+m),(a+m)*(d+m)) );

     C=min ( min((c-m)*(b-m),(c+m)*(b-m)) , min((c-m)*(b+m),(c+m)*(b+m)) );
     D=max ( max((c-m)*(b-m),(c+m)*(b-m)) , max((c-m)*(b+m),(c+m)*(b+m)) );
     if (B < C || D < A) L=m; else { ans=m; R=m-eps; }
    }
   printf("%.10f\n",ans);
  }

inline void inp(int &n )
 {n=0; int ch=getcx();int sign=1;
  while(ch<'0'||ch>'9'){if(ch=='-')sign=-1; ch=getcx();}
  while(  ch >= '0' && ch <= '9' ) n=(n<<3)+(n<<1)+ch-'0',ch=getcx();
  n=n*sign;}

LL gcd(LL A,LL B) { return A>B?gcd(B,A):A?gcd(B%A,A):B; }
LL lcm(LL A,LL B) { return A/gcd(A,B)*B; }
LL pow(LL A,LL B,LL P) { if (!B) return 1%P; LL h=pow(A,B/2,P); h=(h*h)%P; if (B%2) h*=A; return h%P; }

/*/vector <int> z_function (string s) {
  int n = (int) s.length(); vector<int> z (n);
  for (int i=1, l=0, r=0; i<n; ++i) {
    if (i <= r) z[i] = min (r-i+1, z[i-l]);
    while (i+z[i] < n && s[z[i]] == s[i+z[i]]) ++z[i];
    if (i+z[i]-1 > r) l = i,  r = i+z[i]-1; } return z; }/**/

/*/void get_pr(int N) {
 for (int i=2;i<=N;i++)
  {if (lp[i] == 0){ pr.pb(i); lp[i]=i; }
   for (int j=0;j<pr.size()&& pr[j]<=lp[i] && pr[j]*i<=N;j++) lp[pr[j]*i]=pr[j]; } }/**/

/*/int parent(int u) {
  if (PR[u] == u) return u;
  PR[u]=parent(PR[u]);return PR[u];}/**/

/*/void uni(int u,int v){
 u=parent(u); v=parent(v);
 SZ[u]+=SZ[v]; SZ[v]=0; PR[v]=u;}/**/


// GSKHIRTLADZE

#include<bits/stdc++.h>

#define fi first
#define se second
#define pb push_back
#define mk make_pair
#define Pii pair < int , int >
#define tree int t,int l,int r
#define left 2*t,l,(l+r)/2
#define right 2*t+1,(l+r)/2+1,r
#define f_sum(i,r) for (int i=r;i>=0;i=(i&(i+1))-1)
#define f_upd(i,r) for (;i<=r;i=(i|(i+1)))
#define ged(x) scanf("%I64d",&x)
#define getcx getchar
#define LL long long
#define INF 1000000000
#define eps 0.000000001
#define P7 1000000007
#define N5 262145
#define N6 1048577
#define SS system("pause")

using namespace std;

inline void inp(int &n);
LL gcd(LL A,LL B),lcm(LL A,LL B),pow(LL A,LL B,LL P);
vector <int> z_function (string s);
/*/int PR[N5],SZ[N5],parent(int u);void uni(int u,int v);/**/
/*/int lp[N6+2];vector < int > pr;void get_pr(int N);/**/

double a,b,c,d,A,B,C,D,m,L,R,ans;

main() {
   cin>>a>>b>>c>>d;
   double L=0,R=2000000000.00;
   ans=(a*d-b*c)/(a+b+c+d);
   ans=abs(ans);
   printf("%.10f\n",ans);
  }

inline void inp(int &n )
 {n=0; int ch=getcx();int sign=1;
  while(ch<'0'||ch>'9'){if(ch=='-')sign=-1; ch=getcx();}
  while(  ch >= '0' && ch <= '9' ) n=(n<<3)+(n<<1)+ch-'0',ch=getcx();
  n=n*sign;}

LL gcd(LL A,LL B) { return A>B?gcd(B,A):A?gcd(B%A,A):B; }
LL lcm(LL A,LL B) { return A/gcd(A,B)*B; }
LL pow(LL A,LL B,LL P) { if (!B) return 1%P; LL h=pow(A,B/2,P); h=(h*h)%P; if (B%2) h*=A; return h%P; }

/*/vector <int> z_function (string s) {
  int n = (int) s.length(); vector<int> z (n);
  for (int i=1, l=0, r=0; i<n; ++i) {
    if (i <= r) z[i] = min (r-i+1, z[i-l]);
    while (i+z[i] < n && s[z[i]] == s[i+z[i]]) ++z[i];
    if (i+z[i]-1 > r) l = i,  r = i+z[i]-1; } return z; }/**/

/*/void get_pr(int N) {
 for (int i=2;i<=N;i++)
  {if (lp[i] == 0){ pr.pb(i); lp[i]=i; }
   for (int j=0;j<pr.size()&& pr[j]<=lp[i] && pr[j]*i<=N;j++) lp[pr[j]*i]=pr[j]; } }/**/

/*/int parent(int u) {
  if (PR[u] == u) return u;
  PR[u]=parent(PR[u]);return PR[u];}/**/

/*/void uni(int u,int v){
 u=parent(u); v=parent(v);
 SZ[u]+=SZ[v]; SZ[v]=0; PR[v]=u;}/**/


// GSKHIRTLADZE

#include<bits/stdc++.h>

#define fi first
#define se second
#define pb push_back
#define mk make_pair
#define Pii pair < int , int >
#define tree int t,int l,int r
#define left 2*t,l,(l+r)/2
#define right 2*t+1,(l+r)/2+1,r
#define f_sum(i,r) for (int i=r;i>=0;i=(i&(i+1))-1)
#define f_upd(i,r) for (;i<=r;i=(i|(i+1)))
#define ged(x) scanf("%I64d",&x)
#define getcx getchar
#define LL long long
#define INF 1000000000
#define eps 0.0000000001
#define P7 1000000007
#define N5 262145
#define N6 1048577
#define SS system("pause")

using namespace std;

inline void inp(int &n);
LL gcd(LL A,LL B),lcm(LL A,LL B),pow(LL A,LL B,LL P);
vector <int> z_function (string s);
/*/int PR[N5],SZ[N5],parent(int u);void uni(int u,int v);/**/
/*/int lp[N6+2];vector < int > pr;void get_pr(int N);/**/

double a,b,c,d,A,B,C,D,m,L,R,ans;

main() {
   cin>>a>>b>>c>>d;
   double L=0,R=10000000000;
   while (L+eps < R)
    {
     m=(L+R)/2;
     A=min(a-m,a+m)*min(d-m,d+m);
     B=max(a-m,a+m)*max(d-m,d+m);
     if (A > B) swap(A,B);
     C=min(b-m,b+m)*min(c-m,c+m);
     D=max(b-m,b+m)*max(c-m,c+m);
     if (C > D) swap(C,D);
     if (B < C || D < A) L=m; else { ans=m; R=m; }
    }
   printf("%.10f\n",ans);
  }

inline void inp(int &n )
 {n=0; int ch=getcx();int sign=1;
  while(ch<'0'||ch>'9'){if(ch=='-')sign=-1; ch=getcx();}
  while(  ch >= '0' && ch <= '9' ) n=(n<<3)+(n<<1)+ch-'0',ch=getcx();
  n=n*sign;}

LL gcd(LL A,LL B) { return A>B?gcd(B,A):A?gcd(B%A,A):B; }
LL lcm(LL A,LL B) { return A/gcd(A,B)*B; }
LL pow(LL A,LL B,LL P) { if (!B) return 1%P; LL h=pow(A,B/2,P); h=(h*h)%P; if (B%2) h*=A; return h%P; }

/*/vector <int> z_function (string s) {
  int n = (int) s.length(); vector<int> z (n);
  for (int i=1, l=0, r=0; i<n; ++i) {
    if (i <= r) z[i] = min (r-i+1, z[i-l]);
    while (i+z[i] < n && s[z[i]] == s[i+z[i]]) ++z[i];
    if (i+z[i]-1 > r) l = i,  r = i+z[i]-1; } return z; }/**/

/*/void get_pr(int N) {
 for (int i=2;i<=N;i++)
  {if (lp[i] == 0){ pr.pb(i); lp[i]=i; }
   for (int j=0;j<pr.size()&& pr[j]<=lp[i] && pr[j]*i<=N;j++) lp[pr[j]*i]=pr[j]; } }/**/

/*/int parent(int u) {
  if (PR[u] == u) return u;
  PR[u]=parent(PR[u]);return PR[u];}/**/

/*/void uni(int u,int v){
 u=parent(u); v=parent(v);
 SZ[u]+=SZ[v]; SZ[v]=0; PR[v]=u;}/**/


// GSKHIRTLADZE

#include<bits/stdc++.h>

#define fi first
#define se second
#define pb push_back
#define mk make_pair
#define Pii pair < int , int >
#define tree int t,int l,int r
#define left 2*t,l,(l+r)/2
#define right 2*t+1,(l+r)/2+1,r
#define f_sum(i,r) for (int i=r;i>=0;i=(i&(i+1))-1)
#define f_upd(i,r) for (;i<=r;i=(i|(i+1)))
#define ged(x) scanf("%I64d",&x)
#define getcx getchar
#define LL long long
#define INF 1000000000
#define eps 0.0000000001
#define P7 1000000007
#define N5 262145
#define N6 1048577
#define SS system("pause")

using namespace std;

inline void inp(int &n);
LL gcd(LL A,LL B),lcm(LL A,LL B),pow(LL A,LL B,LL P);
vector <int> z_function (string s);
/*/int PR[N5],SZ[N5],parent(int u);void uni(int u,int v);/**/
/*/int lp[N6+2];vector < int > pr;void get_pr(int N);/**/

double a,b,c,d,A,B,C,D,m,L,R,ans;

main() {
   cin>>a>>b>>c>>d;
   double L=0,R=1000000000.00;
   while (L+eps < R)
    {
     m=(L+R)/2;
     A=min ( min((a-m)*(d-m),(a+m)*(d-m)) , min((a-m)*(d+m),(a+m)*(d+m)) );
     B=max ( max((a-m)*(d-m),(a+m)*(d-m)) , max((a-m)*(d+m),(a+m)*(d+m)) );

     C=min ( min((c-m)*(b-m),(c+m)*(b-m)) , min((c-m)*(b+m),(c+m)*(b+m)) );
     D=max ( max((c-m)*(b-m),(c+m)*(b-m)) , max((c-m)*(b+m),(c+m)*(b+m)) );
     if (B < C || D < A) L=m; else R=m;
    }
   printf("%.10f\n",(L+R)/2);
  }

inline void inp(int &n )
 {n=0; int ch=getcx();int sign=1;
  while(ch<'0'||ch>'9'){if(ch=='-')sign=-1; ch=getcx();}
  while(  ch >= '0' && ch <= '9' ) n=(n<<3)+(n<<1)+ch-'0',ch=getcx();
  n=n*sign;}

LL gcd(LL A,LL B) { return A>B?gcd(B,A):A?gcd(B%A,A):B; }
LL lcm(LL A,LL B) { return A/gcd(A,B)*B; }
LL pow(LL A,LL B,LL P) { if (!B) return 1%P; LL h=pow(A,B/2,P); h=(h*h)%P; if (B%2) h*=A; return h%P; }

/*/vector <int> z_function (string s) {
  int n = (int) s.length(); vector<int> z (n);
  for (int i=1, l=0, r=0; i<n; ++i) {
    if (i <= r) z[i] = min (r-i+1, z[i-l]);
    while (i+z[i] < n && s[z[i]] == s[i+z[i]]) ++z[i];
    if (i+z[i]-1 > r) l = i,  r = i+z[i]-1; } return z; }/**/

/*/void get_pr(int N) {
 for (int i=2;i<=N;i++)
  {if (lp[i] == 0){ pr.pb(i); lp[i]=i; }
   for (int j=0;j<pr.size()&& pr[j]<=lp[i] && pr[j]*i<=N;j++) lp[pr[j]*i]=pr[j]; } }/**/

/*/int parent(int u) {
  if (PR[u] == u) return u;
  PR[u]=parent(PR[u]);return PR[u];}/**/

/*/void uni(int u,int v){
 u=parent(u); v=parent(v);
 SZ[u]+=SZ[v]; SZ[v]=0; PR[v]=u;}/**/


// GSKHIRTLADZE

#include<bits/stdc++.h>

#define fi first
#define se second
#define pb push_back
#define mk make_pair
#define Pii pair < int , int >
#define tree int t,int l,int r
#define left 2*t,l,(l+r)/2
#define right 2*t+1,(l+r)/2+1,r
#define f_sum(i,r) for (int i=r;i>=0;i=(i&(i+1))-1)
#define f_upd(i,r) for (;i<=r;i=(i|(i+1)))
#define ged(x) scanf("%I64d",&x)
#define getcx getchar
#define LL long long
#define INF 1000000000
#define eps 0.0000000001
#define P7 1000000007
#define N5 262145
#define N6 1048577
#define SS system("pause")

using namespace std;

inline void inp(int &n);
LL gcd(LL A,LL B),lcm(LL A,LL B),pow(LL A,LL B,LL P);
vector <int> z_function (string s);
/*/int PR[N5],SZ[N5],parent(int u);void uni(int u,int v);/**/
/*/int lp[N6+2];vector < int > pr;void get_pr(int N);/**/

double a,b,c,d,A,B,C,D,m,L,R,ans;

main() {
   cin>>a>>b>>c>>d;
   double L=0,R=10000000000.00;
   while (L+eps < R)
    {
     m=(L+R)/2;
     A=min ( min((a-m)*(d-m),(a+m)*(d-m)) , min((a-m)*(d+m),(a+m)*(d+m)) );
     B=max ( max((a-m)*(d-m),(a+m)*(d-m)) , max((a-m)*(d+m),(a+m)*(d+m)) );

     C=min ( min((c-m)*(b-m),(c+m)*(b-m)) , min((c-m)*(b+m),(c+m)*(b+m)) );
     D=max ( max((c-m)*(b-m),(c+m)*(b-m)) , max((c-m)*(b+m),(c+m)*(b+m)) );
     if (B < C || D < A) L=m; else R=m;
    }
   printf("%.10f\n",(L+R)/2);
  }

inline void inp(int &n )
 {n=0; int ch=getcx();int sign=1;
  while(ch<'0'||ch>'9'){if(ch=='-')sign=-1; ch=getcx();}
  while(  ch >= '0' && ch <= '9' ) n=(n<<3)+(n<<1)+ch-'0',ch=getcx();
  n=n*sign;}

LL gcd(LL A,LL B) { return A>B?gcd(B,A):A?gcd(B%A,A):B; }
LL lcm(LL A,LL B) { return A/gcd(A,B)*B; }
LL pow(LL A,LL B,LL P) { if (!B) return 1%P; LL h=pow(A,B/2,P); h=(h*h)%P; if (B%2) h*=A; return h%P; }

/*/vector <int> z_function (string s) {
  int n = (int) s.length(); vector<int> z (n);
  for (int i=1, l=0, r=0; i<n; ++i) {
    if (i <= r) z[i] = min (r-i+1, z[i-l]);
    while (i+z[i] < n && s[z[i]] == s[i+z[i]]) ++z[i];
    if (i+z[i]-1 > r) l = i,  r = i+z[i]-1; } return z; }/**/

/*/void get_pr(int N) {
 for (int i=2;i<=N;i++)
  {if (lp[i] == 0){ pr.pb(i); lp[i]=i; }
   for (int j=0;j<pr.size()&& pr[j]<=lp[i] && pr[j]*i<=N;j++) lp[pr[j]*i]=pr[j]; } }/**/

/*/int parent(int u) {
  if (PR[u] == u) return u;
  PR[u]=parent(PR[u]);return PR[u];}/**/

/*/void uni(int u,int v){
 u=parent(u); v=parent(v);
 SZ[u]+=SZ[v]; SZ[v]=0; PR[v]=u;}/**/


// GSKHIRTLADZE

#include<bits/stdc++.h>

#define fi first
#define se second
#define pb push_back
#define mk make_pair
#define Pii pair < int , int >
#define tree int t,int l,int r
#define left 2*t,l,(l+r)/2
#define right 2*t+1,(l+r)/2+1,r
#define f_sum(i,r) for (int i=r;i>=0;i=(i&(i+1))-1)
#define f_upd(i,r) for (;i<=r;i=(i|(i+1)))
#define ged(x) scanf("%I64d",&x)
#define getcx getchar
#define LL long long
#define INF 1000000000
#define eps 0.0000000001
#define P7 1000000007
#define N5 262145
#define N6 1048577
#define SS system("pause")

using namespace std;

inline void inp(int &n);
LL gcd(LL A,LL B),lcm(LL A,LL B),pow(LL A,LL B,LL P);
vector <int> z_function (string s);
/*/int PR[N5],SZ[N5],parent(int u);void uni(int u,int v);/**/
/*/int lp[N6+2];vector < int > pr;void get_pr(int N);/**/

double a,b,c,d,A,B,C,D,m,L,R,ans;
int t;

main() {
   cin>>a>>b>>c>>d;
   double L=0,R=1000000000.00;
   t=1000000;
   while (t > 0)
    {t--;
     m=(L+R)/2;
     A=min ( min((a-m)*(d-m),(a+m)*(d-m)) , min((a-m)*(d+m),(a+m)*(d+m)) );
     B=max ( max((a-m)*(d-m),(a+m)*(d-m)) , max((a-m)*(d+m),(a+m)*(d+m)) );

     C=min ( min((c-m)*(b-m),(c+m)*(b-m)) , min((c-m)*(b+m),(c+m)*(b+m)) );
     D=max ( max((c-m)*(b-m),(c+m)*(b-m)) , max((c-m)*(b+m),(c+m)*(b+m)) );
     if (B < C || D < A) L=m; else { ans=m; R=m-eps; }
    }
   printf("%.10f\n",ans);
  }

inline void inp(int &n )
 {n=0; int ch=getcx();int sign=1;
  while(ch<'0'||ch>'9'){if(ch=='-')sign=-1; ch=getcx();}
  while(  ch >= '0' && ch <= '9' ) n=(n<<3)+(n<<1)+ch-'0',ch=getcx();
  n=n*sign;}

LL gcd(LL A,LL B) { return A>B?gcd(B,A):A?gcd(B%A,A):B; }
LL lcm(LL A,LL B) { return A/gcd(A,B)*B; }
LL pow(LL A,LL B,LL P) { if (!B) return 1%P; LL h=pow(A,B/2,P); h=(h*h)%P; if (B%2) h*=A; return h%P; }

/*/vector <int> z_function (string s) {
  int n = (int) s.length(); vector<int> z (n);
  for (int i=1, l=0, r=0; i<n; ++i) {
    if (i <= r) z[i] = min (r-i+1, z[i-l]);
    while (i+z[i] < n && s[z[i]] == s[i+z[i]]) ++z[i];
    if (i+z[i]-1 > r) l = i,  r = i+z[i]-1; } return z; }/**/

/*/void get_pr(int N) {
 for (int i=2;i<=N;i++)
  {if (lp[i] == 0){ pr.pb(i); lp[i]=i; }
   for (int j=0;j<pr.size()&& pr[j]<=lp[i] && pr[j]*i<=N;j++) lp[pr[j]*i]=pr[j]; } }/**/

/*/int parent(int u) {
  if (PR[u] == u) return u;
  PR[u]=parent(PR[u]);return PR[u];}/**/

/*/void uni(int u,int v){
 u=parent(u); v=parent(v);
 SZ[u]+=SZ[v]; SZ[v]=0; PR[v]=u;}/**/


// GSKHIRTLADZE

#include<bits/stdc++.h>

#define fi first
#define se second
#define pb push_back
#define mk make_pair
#define Pii pair < int , int >
#define tree int t,int l,int r
#define left 2*t,l,(l+r)/2
#define right 2*t+1,(l+r)/2+1,r
#define f_sum(i,r) for (int i=r;i>=0;i=(i&(i+1))-1)
#define f_upd(i,r) for (;i<=r;i=(i|(i+1)))
#define ged(x) scanf("%I64d",&x)
#define getcx getchar
#define LL long long
#define INF 1000000000
#define eps 0.0000000001
#define P7 1000000007
#define N5 262145
#define N6 1048577
#define SS system("pause")

using namespace std;

inline void inp(int &n);
LL gcd(LL A,LL B),lcm(LL A,LL B),pow(LL A,LL B,LL P);
vector <int> z_function (string s);
/*/int PR[N5],SZ[N5],parent(int u);void uni(int u,int v);/**/
/*/int lp[N6+2];vector < int > pr;void get_pr(int N);/**/

double a,b,c,d,A,B,C,D,m,L,R,ans;
int t;

main() {
   cin>>a>>b>>c>>d;
   double L=0,R=1000000000.00;
   t=100;
   while (t > 0)
    {t--;
     m=(L+R)/2;
     A=min ( min((a-m)*(d-m),(a+m)*(d-m)) , min((a-m)*(d+m),(a+m)*(d+m)) );
     B=max ( max((a-m)*(d-m),(a+m)*(d-m)) , max((a-m)*(d+m),(a+m)*(d+m)) );

     C=min ( min((c-m)*(b-m),(c+m)*(b-m)) , min((c-m)*(b+m),(c+m)*(b+m)) );
     D=max ( max((c-m)*(b-m),(c+m)*(b-m)) , max((c-m)*(b+m),(c+m)*(b+m)) );
     if (B < C || D < A) L=m; else { ans=m; R=m-eps; }
    }
   printf("%.10f\n",ans);
  }

inline void inp(int &n )
 {n=0; int ch=getcx();int sign=1;
  while(ch<'0'||ch>'9'){if(ch=='-')sign=-1; ch=getcx();}
  while(  ch >= '0' && ch <= '9' ) n=(n<<3)+(n<<1)+ch-'0',ch=getcx();
  n=n*sign;}

LL gcd(LL A,LL B) { return A>B?gcd(B,A):A?gcd(B%A,A):B; }
LL lcm(LL A,LL B) { return A/gcd(A,B)*B; }
LL pow(LL A,LL B,LL P) { if (!B) return 1%P; LL h=pow(A,B/2,P); h=(h*h)%P; if (B%2) h*=A; return h%P; }

/*/vector <int> z_function (string s) {
  int n = (int) s.length(); vector<int> z (n);
  for (int i=1, l=0, r=0; i<n; ++i) {
    if (i <= r) z[i] = min (r-i+1, z[i-l]);
    while (i+z[i] < n && s[z[i]] == s[i+z[i]]) ++z[i];
    if (i+z[i]-1 > r) l = i,  r = i+z[i]-1; } return z; }/**/

/*/void get_pr(int N) {
 for (int i=2;i<=N;i++)
  {if (lp[i] == 0){ pr.pb(i); lp[i]=i; }
   for (int j=0;j<pr.size()&& pr[j]<=lp[i] && pr[j]*i<=N;j++) lp[pr[j]*i]=pr[j]; } }/**/

/*/int parent(int u) {
  if (PR[u] == u) return u;
  PR[u]=parent(PR[u]);return PR[u];}/**/

/*/void uni(int u,int v){
 u=parent(u); v=parent(v);
 SZ[u]+=SZ[v]; SZ[v]=0; PR[v]=u;}/**/


// GSKHIRTLADZE

#include<bits/stdc++.h>

#define fi first
#define se second
#define pb push_back
#define mk make_pair
#define Pii pair < int , int >
#define tree int t,int l,int r
#define left 2*t,l,(l+r)/2
#define right 2*t+1,(l+r)/2+1,r
#define f_sum(i,r) for (int i=r;i>=0;i=(i&(i+1))-1)
#define f_upd(i,r) for (;i<=r;i=(i|(i+1)))
#define ged(x) scanf("%I64d",&x)
#define getcx getchar
#define LL long long
#define INF 1000000000
#define eps 0.0000000001
#define P7 1000000007
#define N5 262145
#define N6 1048577
#define SS system("pause")

using namespace std;

inline void inp(int &n);
LL gcd(LL A,LL B),lcm(LL A,LL B),pow(LL A,LL B,LL P);
vector <int> z_function (string s);
/*/int PR[N5],SZ[N5],parent(int u);void uni(int u,int v);/**/
/*/int lp[N6+2];vector < int > pr;void get_pr(int N);/**/

double a,b,c,d,A,B,C,D,m,L,R,ans;

main() {
   cin>>a>>b>>c>>d;
   double L=0,R=1000000000.00;
   while (L+eps < R)
    {
     m=(L+R)/2;
     A=min ( min((a-m)*(d-m),(a+m)*(d-m)) , min((a-m)*(d+m),(a+m)*(d+m)) );
     B=max ( max((a-m)*(d-m),(a+m)*(d-m)) , max((a-m)*(d+m),(a+m)*(d+m)) );

     C=min ( min((c-m)*(b-m),(c+m)*(b-m)) , min((c-m)*(b+m),(c+m)*(b+m)) );
     D=max ( max((c-m)*(b-m),(c+m)*(b-m)) , max((c-m)*(b+m),(c+m)*(b+m)) );
     if (B < C || D < A) L=m; else { ans=m; R=m-eps; }
    }
   printf("%.10f\n",ans);
  }

inline void inp(int &n )
 {n=0; int ch=getcx();int sign=1;
  while(ch<'0'||ch>'9'){if(ch=='-')sign=-1; ch=getcx();}
  while(  ch >= '0' && ch <= '9' ) n=(n<<3)+(n<<1)+ch-'0',ch=getcx();
  n=n*sign;}

LL gcd(LL A,LL B) { return A>B?gcd(B,A):A?gcd(B%A,A):B; }
LL lcm(LL A,LL B) { return A/gcd(A,B)*B; }
LL pow(LL A,LL B,LL P) { if (!B) return 1%P; LL h=pow(A,B/2,P); h=(h*h)%P; if (B%2) h*=A; return h%P; }

/*/vector <int> z_function (string s) {
  int n = (int) s.length(); vector<int> z (n);
  for (int i=1, l=0, r=0; i<n; ++i) {
    if (i <= r) z[i] = min (r-i+1, z[i-l]);
    while (i+z[i] < n && s[z[i]] == s[i+z[i]]) ++z[i];
    if (i+z[i]-1 > r) l = i,  r = i+z[i]-1; } return z; }/**/

/*/void get_pr(int N) {
 for (int i=2;i<=N;i++)
  {if (lp[i] == 0){ pr.pb(i); lp[i]=i; }
   for (int j=0;j<pr.size()&& pr[j]<=lp[i] && pr[j]*i<=N;j++) lp[pr[j]*i]=pr[j]; } }/**/

/*/int parent(int u) {
  if (PR[u] == u) return u;
  PR[u]=parent(PR[u]);return PR[u];}/**/

/*/void uni(int u,int v){
 u=parent(u); v=parent(v);
 SZ[u]+=SZ[v]; SZ[v]=0; PR[v]=u;}/**/


// GSKHIRTLADZE

#include<bits/stdc++.h>

#define fi first
#define se second
#define pb push_back
#define mk make_pair
#define Pii pair < int , int >
#define tree int t,int l,int r
#define left 2*t,l,(l+r)/2
#define right 2*t+1,(l+r)/2+1,r
#define f_sum(i,r) for (int i=r;i>=0;i=(i&(i+1))-1)
#define f_upd(i,r) for (;i<=r;i=(i|(i+1)))
#define ged(x) scanf("%I64d",&x)
#define getcx getchar
#define LL long long
#define INF 1000000000
#define eps 0.0000000001
#define P7 1000000007
#define N5 262145
#define N6 1048577
#define SS system("pause")

using namespace std;

inline void inp(int &n);
LL gcd(LL A,LL B),lcm(LL A,LL B),pow(LL A,LL B,LL P);
vector <int> z_function (string s);
/*/int PR[N5],SZ[N5],parent(int u);void uni(int u,int v);/**/
/*/int lp[N6+2];vector < int > pr;void get_pr(int N);/**/

double a,b,c,d,A,B,C,D,m,L,R,ans;

main() {
   cin>>a>>b>>c>>d;
   double L=0,R=100000000.00;
   while (L+eps < R)
    {
     m=(L+R)/2;
     A=min ( min((a-m)*(d-m),(a+m)*(d-m)) , min((a-m)*(d+m),(a+m)*(d+m)) );
     B=max ( max((a-m)*(d-m),(a+m)*(d-m)) , max((a-m)*(d+m),(a+m)*(d+m)) );

     C=min ( min((c-m)*(b-m),(c+m)*(b-m)) , min((c-m)*(b+m),(c+m)*(b+m)) );
     D=max ( max((c-m)*(b-m),(c+m)*(b-m)) , max((c-m)*(b+m),(c+m)*(b+m)) );
     if (B < C || D < A) L=m; else R=m;
    }
   printf("%.10f\n",(L+R)/2);
  }

inline void inp(int &n )
 {n=0; int ch=getcx();int sign=1;
  while(ch<'0'||ch>'9'){if(ch=='-')sign=-1; ch=getcx();}
  while(  ch >= '0' && ch <= '9' ) n=(n<<3)+(n<<1)+ch-'0',ch=getcx();
  n=n*sign;}

LL gcd(LL A,LL B) { return A>B?gcd(B,A):A?gcd(B%A,A):B; }
LL lcm(LL A,LL B) { return A/gcd(A,B)*B; }
LL pow(LL A,LL B,LL P) { if (!B) return 1%P; LL h=pow(A,B/2,P); h=(h*h)%P; if (B%2) h*=A; return h%P; }

/*/vector <int> z_function (string s) {
  int n = (int) s.length(); vector<int> z (n);
  for (int i=1, l=0, r=0; i<n; ++i) {
    if (i <= r) z[i] = min (r-i+1, z[i-l]);
    while (i+z[i] < n && s[z[i]] == s[i+z[i]]) ++z[i];
    if (i+z[i]-1 > r) l = i,  r = i+z[i]-1; } return z; }/**/

/*/void get_pr(int N) {
 for (int i=2;i<=N;i++)
  {if (lp[i] == 0){ pr.pb(i); lp[i]=i; }
   for (int j=0;j<pr.size()&& pr[j]<=lp[i] && pr[j]*i<=N;j++) lp[pr[j]*i]=pr[j]; } }/**/

/*/int parent(int u) {
  if (PR[u] == u) return u;
  PR[u]=parent(PR[u]);return PR[u];}/**/

/*/void uni(int u,int v){
 u=parent(u); v=parent(v);
 SZ[u]+=SZ[v]; SZ[v]=0; PR[v]=u;}/**/


// GSKHIRTLADZE

#include<bits/stdc++.h>

#define fi first
#define se second
#define pb push_back
#define mk make_pair
#define Pii pair < int , int >
#define tree int t,int l,int r
#define left 2*t,l,(l+r)/2
#define right 2*t+1,(l+r)/2+1,r
#define f_sum(i,r) for (int i=r;i>=0;i=(i&(i+1))-1)
#define f_upd(i,r) for (;i<=r;i=(i|(i+1)))
#define ged(x) scanf("%I64d",&x)
#define getcx getchar
#define LL long long
#define INF 1000000000
#define eps 0.0000000001
#define P7 1000000007
#define N5 262145
#define N6 1048577
#define SS system("pause")

using namespace std;

inline void inp(int &n);
LL gcd(LL A,LL B),lcm(LL A,LL B),pow(LL A,LL B,LL P);
vector <int> z_function (string s);
/*/int PR[N5],SZ[N5],parent(int u);void uni(int u,int v);/**/
/*/int lp[N6+2];vector < int > pr;void get_pr(int N);/**/

double a,b,c,d,A,B,C,D,m,L,R,ans;

main() {
   cin>>a>>b>>c>>d;
   double L=0,R=500000000.00;
   while (L+eps < R)
    {
     m=(L+R)/2;
     A=min ( min((a-m)*(d-m),(a+m)*(d-m)) , min((a-m)*(d+m),(a+m)*(d+m)) );
     B=max ( max((a-m)*(d-m),(a+m)*(d-m)) , max((a-m)*(d+m),(a+m)*(d+m)) );

     C=min ( min((c-m)*(b-m),(c+m)*(b-m)) , min((c-m)*(b+m),(c+m)*(b+m)) );
     D=max ( max((c-m)*(b-m),(c+m)*(b-m)) , max((c-m)*(b+m),(c+m)*(b+m)) );
     if (B < C || D < A) L=m; else R=m;
    }
   printf("%.10f\n",(L+R)/2);
  }

inline void inp(int &n )
 {n=0; int ch=getcx();int sign=1;
  while(ch<'0'||ch>'9'){if(ch=='-')sign=-1; ch=getcx();}
  while(  ch >= '0' && ch <= '9' ) n=(n<<3)+(n<<1)+ch-'0',ch=getcx();
  n=n*sign;}

LL gcd(LL A,LL B) { return A>B?gcd(B,A):A?gcd(B%A,A):B; }
LL lcm(LL A,LL B) { return A/gcd(A,B)*B; }
LL pow(LL A,LL B,LL P) { if (!B) return 1%P; LL h=pow(A,B/2,P); h=(h*h)%P; if (B%2) h*=A; return h%P; }

/*/vector <int> z_function (string s) {
  int n = (int) s.length(); vector<int> z (n);
  for (int i=1, l=0, r=0; i<n; ++i) {
    if (i <= r) z[i] = min (r-i+1, z[i-l]);
    while (i+z[i] < n && s[z[i]] == s[i+z[i]]) ++z[i];
    if (i+z[i]-1 > r) l = i,  r = i+z[i]-1; } return z; }/**/

/*/void get_pr(int N) {
 for (int i=2;i<=N;i++)
  {if (lp[i] == 0){ pr.pb(i); lp[i]=i; }
   for (int j=0;j<pr.size()&& pr[j]<=lp[i] && pr[j]*i<=N;j++) lp[pr[j]*i]=pr[j]; } }/**/

/*/int parent(int u) {
  if (PR[u] == u) return u;
  PR[u]=parent(PR[u]);return PR[u];}/**/

/*/void uni(int u,int v){
 u=parent(u); v=parent(v);
 SZ[u]+=SZ[v]; SZ[v]=0; PR[v]=u;}/**/


// GSKHIRTLADZE

#include<bits/stdc++.h>

#define fi first
#define se second
#define pb push_back
#define mk make_pair
#define Pii pair < int , int >
#define tree int t,int l,int r
#define left 2*t,l,(l+r)/2
#define right 2*t+1,(l+r)/2+1,r
#define f_sum(i,r) for (int i=r;i>=0;i=(i&(i+1))-1)
#define f_upd(i,r) for (;i<=r;i=(i|(i+1)))
#define ged(x) scanf("%I64d",&x)
#define getcx getchar
#define LL long long
#define INF 1000000000
#define eps 0.000000001
#define P7 1000000007
#define N5 262145
#define N6 1048577
#define SS system("pause")

using namespace std;

inline void inp(int &n);
LL gcd(LL A,LL B),lcm(LL A,LL B),pow(LL A,LL B,LL P);
vector <int> z_function (string s);
/*/int PR[N5],SZ[N5],parent(int u);void uni(int u,int v);/**/
/*/int lp[N6+2];vector < int > pr;void get_pr(int N);/**/

double a,b,c,d,A,B,C,D,m,L,R,ans;

main() {
   cin>>a>>b>>c>>d;
   double L=0,R=1000000000.00;
   ans=(a*d-b*c)/(a+b+c+d);
   ans=abs(ans);
   printf("%.10f\n",ans);
  }

inline void inp(int &n )
 {n=0; int ch=getcx();int sign=1;
  while(ch<'0'||ch>'9'){if(ch=='-')sign=-1; ch=getcx();}
  while(  ch >= '0' && ch <= '9' ) n=(n<<3)+(n<<1)+ch-'0',ch=getcx();
  n=n*sign;}

LL gcd(LL A,LL B) { return A>B?gcd(B,A):A?gcd(B%A,A):B; }
LL lcm(LL A,LL B) { return A/gcd(A,B)*B; }
LL pow(LL A,LL B,LL P) { if (!B) return 1%P; LL h=pow(A,B/2,P); h=(h*h)%P; if (B%2) h*=A; return h%P; }

/*/vector <int> z_function (string s) {
  int n = (int) s.length(); vector<int> z (n);
  for (int i=1, l=0, r=0; i<n; ++i) {
    if (i <= r) z[i] = min (r-i+1, z[i-l]);
    while (i+z[i] < n && s[z[i]] == s[i+z[i]]) ++z[i];
    if (i+z[i]-1 > r) l = i,  r = i+z[i]-1; } return z; }/**/

/*/void get_pr(int N) {
 for (int i=2;i<=N;i++)
  {if (lp[i] == 0){ pr.pb(i); lp[i]=i; }
   for (int j=0;j<pr.size()&& pr[j]<=lp[i] && pr[j]*i<=N;j++) lp[pr[j]*i]=pr[j]; } }/**/

/*/int parent(int u) {
  if (PR[u] == u) return u;
  PR[u]=parent(PR[u]);return PR[u];}/**/

/*/void uni(int u,int v){
 u=parent(u); v=parent(v);
 SZ[u]+=SZ[v]; SZ[v]=0; PR[v]=u;}/**/


#include<cstdio>
#include<cstdlib>
#include<iostream>
#include<vector>
#include<algorithm>
#include<map>
#include<cmath>
#include<string>
#include<set>
#include<sstream>

using namespace std;
typedef long long ll;
ll a,b,c,d;
double malo=0.0,vela=100000000.0;
int main()
{
    cin>>a>>b>>c>>d;
    if(a*d==b*c){printf("0.00000\n");return 0;}
    while(vela-malo>0.0000000001)
    {
        double teraz=(vela+malo)/2.0;
        double malysucin=min((a*1.0-teraz)*(d*1.0-teraz),min((a*1.0-teraz)*(d*1.0+teraz),min((a*1.0+teraz)*(d*1.0-teraz),(a*1.0+teraz)*(d*1.0+teraz)))),velkysucin=max((a*1.0-teraz)*(d*1.0-teraz),max((a*1.0-teraz)*(d*1.0+teraz),max((a*1.0+teraz)*(d*1.0-teraz),(a*1.0+teraz)*(d*1.0+teraz))));
        double maly=min((b*1.0-teraz)*(c*1.0-teraz),min((b*1.0-teraz)*(c*1.0+teraz),min((b*1.0+teraz)*(c*1.0-teraz),(b*1.0+teraz)*(c*1.0+teraz)))),velky=max((b*1.0-teraz)*(c*1.0-teraz),max((b*1.0-teraz)*(c*1.0+teraz),max((b*1.0+teraz)*(c*1.0-teraz),(b*1.0+teraz)*(c*1.0+teraz))));
        if(maly<malysucin)
        {
            if(velky>malysucin)vela=teraz;
            else malo=teraz;
        }
        else
        {
            if(velkysucin>maly)vela=teraz;
            else malo=teraz;
        }

    }
    printf("%.10f\n",vela);
    return 0;
}


#include<cstdio>
#include<cstdlib>
#include<iostream>
#include<vector>
#include<algorithm>
#include<map>
#include<cmath>
#include<string>
#include<set>
#include<sstream>

using namespace std;
typedef long long ll;
ll a,b,c,d;
double malo=0.0,vela=10000000000.0;
int main()
{
    cin>>a>>b>>c>>d;
    if(a*d==b*c){printf("0.00000\n");return 0;}
    while(vela-malo>0.000000001)
    {
        double teraz=(vela+malo)/2.0;
        double malysucin=min((a*1.0-teraz)*(d*1.0-teraz),min((a*1.0-teraz)*(d*1.0+teraz),min((a*1.0+teraz)*(d*1.0-teraz),(a*1.0+teraz)*(d*1.0+teraz)))),velkysucin=max((a*1.0-teraz)*(d*1.0-teraz),max((a*1.0-teraz)*(d*1.0+teraz),max((a*1.0+teraz)*(d*1.0-teraz),(a*1.0+teraz)*(d*1.0+teraz))));
        double maly=min((b*1.0-teraz)*(c*1.0-teraz),min((b*1.0-teraz)*(c*1.0+teraz),min((b*1.0+teraz)*(c*1.0-teraz),(b*1.0+teraz)*(c*1.0+teraz)))),velky=max((b*1.0-teraz)*(c*1.0-teraz),max((b*1.0-teraz)*(c*1.0+teraz),max((b*1.0+teraz)*(c*1.0-teraz),(b*1.0+teraz)*(c*1.0+teraz))));
        if(maly<malysucin)
        {
            if(velky>malysucin)vela=teraz;
            else malo=teraz;
        }
        else
        {
            if(velkysucin>maly)vela=teraz;
            else malo=teraz;
        }

    }
    printf("%.11f\n",vela);
    return 0;
}


#include<cstdio>
#include<cstdlib>
#include<iostream>
#include<vector>
#include<algorithm>
#include<map>
#include<cmath>
#include<string>
#include<set>
#include<sstream>

using namespace std;
typedef long long ll;
ll a,b,c,d;
double malo=0.0,vela=10000000000.0;
int main()
{
    cin>>a>>b>>c>>d;
    if(a*d==b*c){printf("0.00000\n");return 0;}
    while(vela-malo>0.0000000001)
    {
        double teraz=(vela+malo)/2.0;
        double malysucin=min((a*1.0-teraz)*(d*1.0-teraz),min((a*1.0-teraz)*(d*1.0+teraz),min((a*1.0+teraz)*(d*1.0-teraz),(a*1.0+teraz)*(d*1.0+teraz)))),velkysucin=max((a*1.0-teraz)*(d*1.0-teraz),max((a*1.0-teraz)*(d*1.0+teraz),max((a*1.0+teraz)*(d*1.0-teraz),(a*1.0+teraz)*(d*1.0+teraz))));
        double maly=min((b*1.0-teraz)*(c*1.0-teraz),min((b*1.0-teraz)*(c*1.0+teraz),min((b*1.0+teraz)*(c*1.0-teraz),(b*1.0+teraz)*(c*1.0+teraz)))),velky=max((b*1.0-teraz)*(c*1.0-teraz),max((b*1.0-teraz)*(c*1.0+teraz),max((b*1.0+teraz)*(c*1.0-teraz),(b*1.0+teraz)*(c*1.0+teraz))));
        if(maly<malysucin)
        {
            if(velky>malysucin)vela=teraz;
            else malo=teraz;
        }
        else
        {
            if(velkysucin>maly)vela=teraz;
            else malo=teraz;
        }

    }
    printf("%.10f\n",vela);
    return 0;
}


#include<cstdio>
#include<cstdlib>
#include<iostream>
#include<vector>
#include<algorithm>
#include<map>
#include<cmath>
#include<string>
#include<set>
#include<sstream>

using namespace std;
typedef long long ll;
ll a,b,c,d;
double malo=0.0,vela=10000000000.0;
int main()
{
    cin>>a>>b>>c>>d;
    if(a*d==b*c){printf("0.00000\n");return 0;}
    while(vela-malo>0.0000001)
    {
        double teraz=(vela+malo)/2.0;
        double malysucin=min((a*1.0-teraz)*(d*1.0-teraz),min((a*1.0-teraz)*(d*1.0+teraz),min((a*1.0+teraz)*(d*1.0-teraz),(a*1.0+teraz)*(d*1.0+teraz)))),velkysucin=max((a*1.0-teraz)*(d*1.0-teraz),max((a*1.0-teraz)*(d*1.0+teraz),max((a*1.0+teraz)*(d*1.0-teraz),(a*1.0+teraz)*(d*1.0+teraz))));
        double maly=min((b*1.0-teraz)*(c*1.0-teraz),min((b*1.0-teraz)*(c*1.0+teraz),min((b*1.0+teraz)*(c*1.0-teraz),(b*1.0+teraz)*(c*1.0+teraz)))),velky=max((b*1.0-teraz)*(c*1.0-teraz),max((b*1.0-teraz)*(c*1.0+teraz),max((b*1.0+teraz)*(c*1.0-teraz),(b*1.0+teraz)*(c*1.0+teraz))));
        if(maly<malysucin)
        {
            if(velky>malysucin)vela=teraz;
            else malo=teraz;
        }
        else
        {
            if(velkysucin>maly)vela=teraz;
            else malo=teraz;
        }

    }
    printf("%.10f\n",vela);
    return 0;
}


#include<cstdio>
#include<cstdlib>
#include<iostream>
#include<vector>
#include<algorithm>
#include<map>
#include<cmath>
#include<string>
#include<set>
#include<sstream>

using namespace std;
typedef long long ll;
ll a,b,c,d;
double malo=0.0,vela=100000000000.0;
int main()
{
    cin>>a>>b>>c>>d;
    if(a*d==b*c){printf("0.00000\n");return 0;}
    while(vela-malo>0.0000000001)
    {
        double teraz=(vela+malo)/2.0;
        double malysucin=min((a*1.0-teraz)*(d*1.0-teraz),min((a*1.0-teraz)*(d*1.0+teraz),min((a*1.0+teraz)*(d*1.0-teraz),(a*1.0+teraz)*(d*1.0+teraz)))),velkysucin=max((a*1.0-teraz)*(d*1.0-teraz),max((a*1.0-teraz)*(d*1.0+teraz),max((a*1.0+teraz)*(d*1.0-teraz),(a*1.0+teraz)*(d*1.0+teraz))));
        double maly=min((b*1.0-teraz)*(c*1.0-teraz),min((b*1.0-teraz)*(c*1.0+teraz),min((b*1.0+teraz)*(c*1.0-teraz),(b*1.0+teraz)*(c*1.0+teraz)))),velky=max((b*1.0-teraz)*(c*1.0-teraz),max((b*1.0-teraz)*(c*1.0+teraz),max((b*1.0+teraz)*(c*1.0-teraz),(b*1.0+teraz)*(c*1.0+teraz))));
        if(maly<malysucin)
        {
            if(velky>malysucin)vela=teraz;
            else malo=teraz;
        }
        else
        {
            if(velkysucin>maly)vela=teraz;
            else malo=teraz;
        }

    }
    printf("%.10f\n",vela);
    return 0;
}


#include<cstdio>
#include<cstdlib>
#include<iostream>
#include<vector>
#include<algorithm>
#include<map>
#include<cmath>
#include<string>
#include<set>
#include<sstream>

using namespace std;
typedef long long ll;
ll a,b,c,d;
double malo=0.0,vela=10000000000.0;
int main()
{
    cin>>a>>b>>c>>d;
    if(a*d==b*c){printf("0.00000\n");return 0;}
    for(int i=0;i<200;i++)
    {
        double teraz=(vela+malo)/2.0;
        double malysucin=min((a*1.0-teraz)*(d*1.0-teraz),min((a*1.0-teraz)*(d*1.0+teraz),min((a*1.0+teraz)*(d*1.0-teraz),(a*1.0+teraz)*(d*1.0+teraz)))),velkysucin=max((a*1.0-teraz)*(d*1.0-teraz),max((a*1.0-teraz)*(d*1.0+teraz),max((a*1.0+teraz)*(d*1.0-teraz),(a*1.0+teraz)*(d*1.0+teraz))));
        double maly=min((b*1.0-teraz)*(c*1.0-teraz),min((b*1.0-teraz)*(c*1.0+teraz),min((b*1.0+teraz)*(c*1.0-teraz),(b*1.0+teraz)*(c*1.0+teraz)))),velky=max((b*1.0-teraz)*(c*1.0-teraz),max((b*1.0-teraz)*(c*1.0+teraz),max((b*1.0+teraz)*(c*1.0-teraz),(b*1.0+teraz)*(c*1.0+teraz))));
        if(maly<malysucin)
        {
            if(velky>malysucin)vela=teraz;
            else malo=teraz;
        }
        else
        {
            if(velkysucin>maly)vela=teraz;
            else malo=teraz;
        }

    }
    printf("%.11f\n",vela);
    return 0;
}


#include<cstdio>
#include<cstdlib>
#include<iostream>
#include<vector>
#include<algorithm>
#include<map>
#include<cmath>
#include<string>
#include<set>
#include<sstream>

using namespace std;
typedef long long ll;
ll a,b,c,d;
double malo=0.0,vela=100000000.0;
int main()
{
    cin>>a>>b>>c>>d;
    if(a*d==b*c){printf("0.00000\n");return 0;}
    while(vela-malo>0.0000000001)
    {
        double teraz=(vela+malo)/2.0;
        double malysucin=(a*1.0-teraz)*(d*1.0-teraz),velkysucin=(a*1.0+teraz)*(d*1.0+teraz);
        double maly=(b*1.0-teraz)*(c*1.0-teraz),velky=(b*1.0+teraz)*(c*1.0+teraz);
        if(maly<malysucin)
        {
            if(velky>malysucin)vela=teraz;
            else malo=teraz;
        }
        else
        {
            if(velkysucin>maly)vela=teraz;
            else malo=teraz;
        }

    }
    printf("%.10f\n",vela);
    return 0;
}


#include<stdio.h>
int main()
{
	int n,i,c=0;
	int aabhas1,aabhas2;
	scanf("%d",&n);
	for(i=n/7;i>=0;i--)
	{
		if((n-7*i)%4==0)
		{
			c=1;
			aabhas1=i;
			aabhas2=(n-7*i)/4;
			break;
		}
	}
	if(c==0)
		puts("-1");
	else
	{
		for(i=aabhas2;i>0;i--)
			printf("4");
		for(i=0;i<aabhas1;i++)
			printf("7");
		printf("\n");
	}
	return 0;
}


#include<stdio.h>
int main()
{
        int n,i,j,n4,n7,flag=0;
        scanf("%d",&n);
        for(i=0;i<=n;i++)
        {
                for(j=0;j<=n;j++)
                {
                        if(i*4 + j*7 == n)
                        {
                                flag=1;
                                for(n4=0;n4<i;n4++)
                                        printf("4");
                                for(n7=0;n7<j;n7++)
                                        printf("7");
                                break;
                        }
                }
                if(flag)
                        break;
        }
        if(!flag)
                printf("-1");
        printf("\n");
        return 0;
}


//header files
#include<stdio.h>
int main()
{
        int n,i,j,n4=0,n7=0,flag=0;
        scanf("%d",&n);
        for(i=0;i<n;i++)
                for(j=0;j<n;j++)
                        if(i*4 + j*7 == n)
                        {
                                flag=1;
                                n4=i;
                                n7=j;
                                break;
                        }
        for(i=0;i<n4;i++)
                printf("4");
        for(j=0;j<n7;j++)
                printf("7");
        if(!flag)
                printf("-1");
        printf("\n");
        return 0;
}


#include <stdio.h>
#include <stdlib.h>

int main()
{
    int a,b,i,n;
    scanf("%d",&n);

    for(a=0;4*a<=n;a++)
    {
        if((n-4*a)%7==0)
        {
            b=(n-4*a)/7;
            break;
        }
    }

    if(4*a>n)
        printf("-1");
    else
    {
        for(i=1;i<=a;i++)
            printf("4");
        for(i=1;i<=b;i++)
            printf("7");
    }

    //system("pause");
    return 0;
}


#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main(){
	int number,count,numtemp,num7,num4;
	char sol[1000007]="";
	scanf("%d",&number);
	//printf("%d",number);
	num7=number/7;
	numtemp=number-num7*7;
	while(numtemp%4!=0&&num7>0)
	{
		numtemp+=7;
		num7-=1;

	}

		num4=numtemp/4;
		numtemp-=num4*4;
	for(count=0;count<num4;count++){
		sol[count]='4';

	}

	for(count=num4;count<num4+num7;count++){
		sol[count]='7';

	}

	sol[count]='\0';
	if(numtemp==0)
		printf("%s\n",sol);
	else
		printf("-1");
	//system("Pause");//I AM JM
	return 0;
}


#include<stdio.h>
#include<string.h>
int n,a,i;
int main()
{
    scanf("%d",&n);
    while(4*a<=n && !i)
    {
        if((n-4*a)%7==0)
            i=1;
        a++;
    }
    if(!i)  { printf("-1"); return 0;}
    a--;
    for(i=0;i<a;i++)  printf("4");
    a=(n-4*a)/7;
    for(i=0;i<a;i++)  printf("7");
    return 0;
}


#include <stdio.h>

char output[250010];   /* 10^6 / 4 */

int main(){
   int n, four, seven, seven_max, min_digit, min_four, min_seven;
   scanf("%d", &n);
   seven_max = n / 7;
   min_digit = n;

   for(seven = 0; seven <= seven_max; seven++){
      if( (n - seven*7) % 4 == 0 ){
         four = (n - seven*7) / 4;

         if(four+seven < min_digit){
            min_digit = four + seven;
            min_four = four;
            min_seven = seven;
         }
      }
   }

   if(min_digit == n) puts("-1");
   else{
      int i, j = 0;
      for(i = 0; i < min_four; ++i) output[j++] = '4';
      for(i = 0; i < min_seven; ++i) output[j++] = '7';
      output[j] = 0;
      printf("%s\n", output);
   }

   return 0;
}


/* Problem: 109A - Lucky Sum of Digits */
/* Solver: Gusztav Szmolik */

#include <stdio.h>

int main ()
    {
    unsigned int n;
    unsigned int dmn;
    unsigned int dmx;
    unsigned short sol;
    unsigned int i;
    unsigned int d;
    unsigned int fc;
    unsigned int sc;

    if (scanf("%u",&n) != 1)
        return -1;
    if (n < 1 || n > 1000000)
        return -1;
    dmn = n/7;
    if (n%7)
        dmn++;
    dmx = n/4;
    sol = 0;
    for (i = dmn; i <= dmx && !sol; i++)
        {
        d = i*7-n;
        if (!(d%3))
            {
            fc = d/3;
            sc = i-fc;
            sol = 1;
            }
        }
    if (sol)
        {
        for (i = 0; i < fc; i++)
            printf ("4");
        for (i = 0; i < sc; i++)
            printf ("7");
        printf ("\n");
        }
    else
        printf ("-1\n");
    return 0;
    }


#include <stdlib.h>
#include <stdio.h>
int main(){
    int n,i,j;
    scanf("%d",&n);
    for(i=n/7;i>=0;i--){
        if((n-i*7)%4==0){
            for(j=0;j<(n-i*7)/4;j++)putchar('4');
            for(j=0;j<i;j++)putchar('7');
            return 0;
        }
    }
    printf("-1");
    return 0;
}


#include <stdio.h>

int main()
{
	int n,i;
	scanf("%d",&n);
	for(i=0;i<7;i++)
	{
		int m = n - 4*i;
		if(m >=0 && m%7==0)
		{
			int j;
			for(j=0;j<i;j++)
				printf("4");
			for(j=0;j<m/7;j++)
				printf("7");
			return 0;
		}
	}

	printf("-1\n");
	return 0;
}


#include <stdio.h>

int main()
{
	int n;
	scanf("%d",&n);
	int sum = 0,four = 0,seven = 0;
	while(sum < n)
	{
		if(sum+7 <= n)
		{
			sum+=7;
			seven++;
			continue;
		}else

		if(sum+4 <= n)
		{
			sum+=4;
			four++;
			continue;
		}

		sum = -1;
		break;
	}
	int i;
	if(sum == -1)
	{
		printf("-1\n");
		return 0;
	}
	for(i=0;i<four;i++)
		printf("4");
	for(i=0;i<seven;i++)
		printf("7");
	printf("\n");
	return 0;
}


#include<stdio.h>
int main()
{
    int n,y,div=1,i;
    scanf("%d",&n);

    y=0;
    while(div%4!=0)
    {
    div= (n-(7*y));

    y++;
    if(div<0) { printf("-1\n");  break;  }
    }
    div=div/4;

    for(i=0;i<div;i++) printf("4");
    for(i=0;i<y-1 && div>=0;i++) printf("7");
    return 0;
}


#include<stdio.h>
int main()
{
    int n,y,four=0,seven=0,i,t=0;;
    scanf("%d",&n);

        while(n%7!=0)
        {
            n=n-4;
            four++;
            if(n<0) { printf("-1\n"); t=1; break;  }
        }
        seven=n/7;

    if(t==0){
    for(i=1;i<=four;i++) printf("4");
    for(i=1;i<=seven;i++) printf("7");
    }

    return 0;
}


#include<stdio.h>
int main()
{
    int n,y,div=1,i,t=0;;
    scanf("%d",&n);

    if(n==4) printf("4\n");
    else if(n==7) printf("7\n");
    else {
    y=1;
    while(div%7!=0)
    {
    div= (n-(4*y));
    y++;
    if(div<0) { printf("-1\n"); t=1; break;  }
    }
    div=div/7;
    if(t==0){
    for(i=0;i<y-1;i++) printf("4");
    for(i=0;i<div;i++) printf("7");
    }
    }
    return 0;
}


#include<stdio.h>
#include<string.h>
#include<math.h>
#include<stdlib.h>
#define max(a,b) ((a)>(b))?(a):(b)
#define min(a,b) ((a)<(b))?(a):(b)
#define si(n) scanf("%d",&n)
#define ss(s) scanf("%s",s)
#define sort(a,n) qsort(a,n,sizeof(int),compare)
#define pi(n) printf("%d ",n)
#define ps(s) printf("%s",s)
#define loop(i,n) for(i=0;i<n;i++)
#define Loop(i,n) for(i=1;i<=n;i++)
typedef long long int lld;
#define MAX 20000005
//int a[MAX];
       int compare(const void *a,const void *b)
       {
       return *(int *)a-*(int *)b;
       }
int main()
{
    int i,n,min=MAX,x,y,ans1,ans2;
    si(n);
    for(y=0;y<=n/7;y++)
    {
        if(!((n-7*y)%4))
        {
            x=(n-7)/4;
            if((x+y)<min)
            {
            min=x+y;
            ans1=y;
            ans2=x;
            }
        }
    }
        if(min==MAX)
        printf("-1");
        else
        {
            loop(i,ans2)
            putchar('4');
            loop(i,ans1)
            putchar('7');
        }
        return 0;
    }


#include<stdio.h>
#include<string.h>
#include<math.h>
#include<stdlib.h>
#define max(a,b) ((a)>(b))?(a):(b)
#define min(a,b) ((a)<(b))?(a):(b)
#define si(n) scanf("%d",&n)
#define ss(s) scanf("%s",s)
#define sort(a,n) qsort(a,n,sizeof(int),compare)
#define pi(n) printf("%d ",n)
#define ps(s) printf("%s",s)
#define loop(i,n) for(i=0;i<n;i++)
#define Loop(i,n) for(i=1;i<=n;i++)
typedef long long int lld;
#define MAX 20000005
//int a[MAX];
       int compare(const void *a,const void *b)
       {
       return *(int *)a-*(int *)b;
       }
int main()
{
    int i,n,min=MAX,x,y,ans1,ans2;
    si(n);
    for(y=0;y<=n/7;y++)
    {
        if(!((n-7*y)%4))
        {
            x=(n-7*y)/4;
            if((x+y)<min)
            {
            min=x+y;
            ans1=y;
            ans2=x;
            }
        }
    }
        if(min==MAX)
        printf("-1");
        else
        {
            loop(i,ans2)
            putchar('4');
            loop(i,ans1)
            putchar('7');
        }
        return 0;
    }


#include<stdio.h>
#include<string.h>

int a[128];

int main() {
	int i,n,j;
	memset(a,0xff,sizeof(a));
	a[0]=0;
	for(i=0;i<100;i++) if (a[i]>=0) {
		a[i+4]=a[i]*10+4;
	}
	scanf("%d",&n);
	if (n%7) for(j=n%7;j<=n;j+=7) {
		if (j>0 && a[j]>=0) {
			printf("%d",a[j]);
			break;
		}
	} else j=0;
	if (j>n) printf("-1"); else for(;j<n;j+=7) putchar('7');
	puts("");
	return 0;
}


#include<stdio.h>
int check(int n)
{
	int a,flag=1,s=0;
	while(n!=0)
	{
		a=n%10;
		if(a!=4 && a!=7)
		{
			flag=0;
			break;
		}
		s+=a;
		n/=10;
	}
	if(flag==1)
		return s;
	return 0;
}
int main()
{
	int i=1,n;
	scanf("%d",&n);
	if(n!=0)
	for(i=4;i<=1000000;i++)
	{
		if(check(i)==n)
		{
			printf("%d\n",i);
			return 0;
		}
	}
	printf("-1\n");
	return 0;
}


#include<stdio.h>
int check(int n)
{
	int a,flag=1,s=0;
	while(n!=0)
	{
		a=n%10;
		if(a!=4 && a!=7)
		{
			flag=0;
			break;
		}
		s+=a;
		n/=10;
	}
	if(flag==1)
		return s;
	return 0;
}
int main()
{
	int i=1,n;
	scanf("%d",&n);
	for(i=4;i<=1000000;i++)
	{
		if(check(i)==n)
		{
			printf("%d\n",i);
			return 0;
		}
	}
	printf("-1\n");
	return 0;
}


#include<math.h>
#include<string.h>
int main(){
	int n,i,j,k;
	while(scanf("%d",&n)!=EOF){
		for(i=0;n%7!=0;i++){
			if(n<0)
				break;
			n=n-4;
		}
		j=n/7;
		if(n>=0){
			while(i--)
				printf("4");
			while(j--)
				printf("7");
			printf("\n");
		}
		else
			printf("-1\n");

	}
	return 0;
}