

Tf, Vf, Hf, Td, Vd, Hd = map(int, input().split())

Tc2 = Tf + (2*Hf)**0.5
Tc0 = Tf + (2*(Hf-Hd))**(0.5)
#print("tc0")
#print(Tc0)
#print("tc2")
#print(Tc2)

if Vd > Vf:
  Tc = (Vf*Tf - Vd*Td) / (Vf - Vd)
  
  #print("Tc")
  #print(Tc)
  #print("Can catch:")
  #print(Tc0)

  if Tc <= Tc0:
    print("case 2")
    print(Tc)
    Tr = Tc0 + Vf*(Tc0- Tf)/Vd
  else:
    Tr = 0

else:
#  print("case 3")
  Tr = Td + 2 * Tc2 * Vf / Vd
  
print(Tr)

