a, b, c, x, y = [int(i) for i in input().split()]

n = a * x + b * y
m = c * max(x, y) * 2

v = 0

if a <= c and b <= c:
    v = n
elif a >= c and b >= c:
    v = m
elif a <= c:
    if x >= y:
        v = c*2*y + min(c*(x-y)*2, a*(x-y))
    else:
        v = c*2*x + b*(y-x)
else:
    if x <= y:
        v = c*2*x + min(c*(y-x)*2, b*(y-x))
    else:
        v = c*2*y + a*(x-y)

print(min(n, v))