from decimal import Decimal a, b, x, y = [Decimal(x) for x in input().split()] res = Decimal(0) r = b / a if x * r <= y: res = x * (1 + r) else: res = y * (1 + 1 / r) print(res)