#include int main(void){ double vl,vr,vlp,vrp,d,w,t,r=0; scanf("%lf%lf%lf%lf",&vl,&vr,&d,&w); vlp=0;vrp=d; while(1){ t = (vrp-vlp)/(vr+w); r+=(t*w); vlp+=(t*vl);vrp-=(t*vr); if(vrp-vlp < 0.0000000001){break;} t = (vrp-vlp)/(vl+w); r+=(t*w); vlp+=(t*vl);vrp-=(t*vr); if(vrp-vlp < 0.0000000001){break;} } printf("%.12lf",r); return 0; }