import sys input = sys.stdin.readline from collections import * a, b, c, d, e, f = map(int, input().split()) print((f-e+c*c/4/a+d*d/4/b)**0.5)