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