# -*- coding:utf-8 -*- if __name__ == '__main__': a, b, x, y = map(int, input().split()) print(x + x * b / a if a * y > b * x else y * a / b + y)