a,b,x,y=[int(x) for x in input().split()] print(x+x*b/a) if x/a*b<=y else print(y+y*a/b)