x,y,z,w = map(int,input().split()) low = 1 high = x for i in range(100): a = (low+high)/2 b = x/a if (a**2+y**2)**(0.5)-w>(b**2+z**2)**(0.5): high = (high+low)/2 else: low = (high+low)/2 s = (high+low)/2 t = x/s print(x-(s*y)/2-(t-y)*(s-z)/2-(t*z)/2)