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