#include int main (void) { int a,b,x,y; double ad,bd,xd,yd,n; scanf("%d %d %d %d",&a,&b,&x,&y); ad=a; bd=b; xd=x; yd=y; if((x/a)>(y/b)) { n = yd * (ad + bd)/bd; } else { n = xd * (ad + bd)/ad; } printf("%f\n",n); return 0; }