import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline def from_read(): return [int(x) for x in read().splitlines()] def from_readline(): return [int(x) for x in readline().split()] def read_matrix(N, M): matrix = [None for i in range(N)] for i in range(N): matrix[i] = from_readline() return matrix def solve(xa, ya, xb, yb): l = 0 r = 10000 for _ in range(1000): c1 = (2*l + r) / 3 c2 = (l + 2*r) / 3 L1 = (xa**2 + (c1 - ya)**2)**.5 + (xb**2 + (c1 - yb)**2)**.5 L2 = (xa**2 + (c2 - ya)**2)**.5 + (xb**2 + (c2 - yb)**2)**.5 if L1 > L2: l = c1 else: r = c2 return l def main(): xa, ya = from_readline() xb, yb = from_readline() print(solve(xa, ya, xb, yb)) if __name__ == "__main__": main()