local a, b = {}, {}
for i = 1, 6 do a[i] = io.read("*n") / 100 end
for i = 1, 6 do b[i] = io.read("*n") / 100 end
local red, blue = 0, 0
for i = 1, 6 do
  local r = a[i] / (a[i] + b[i])
  r = math.max(r, 1 - r)
  red = red + a[i] * r
  blue = blue + b[i] * r
end
print(string.format("%.10f", math.min(red, blue)))
