# ABC095C - Half and Half
a, b, c, x, y = list(map(int, input().rstrip().split()))
ans = min(
    c * 2 * max(x, y),
    a * x + b * y,
    c * 2 * min(x, y) + a * abs(x - y),
    c * 2 * min(x, y) + b * abs(y - x),
)
print(ans)