#!/usr/bin/python a, b, x, y = map(int, raw_input().split()) if a*y >= b*x: res = float(x) * (a+b) / a else: res = float(y) * (a+b) / b print res