a, b, c, x, y = map(int, input().split())
half = min(x, y) * 2 * c + (max(x, y) - min(x, y)) * min(a, b)
a_b = a * x + b * y
if (a >= 2 * c and b >= 2 * c): print(int(max(x, y) * 2 * c))
else: print(min(half, a_b))
