a,b,c;main(d){scanf("%d%d%d%d",&b,&a,&c,&d);a=!printf("%f",a*c>b*d?d+d*b*1./a:c+c*a*1./b);}