# ABC095C - Half and Half
a, b, c, x, y = list(map(int, input().rstrip().split()))
ans = [c * 2 * max(x, y), a * x + b * y]
if x > y:
    ans += [c * 2 * y + a * (x - y)]
elif y < x:
    ans += [c * 2 * x + b * (y - x)]
print(min(ans))