a,b,x,y=map(int,input().split()) if x*b/a<=y: print(x+x*b/a) else: print(y+y*a/b)