a, b, c, x, y = map(int, input().split())

d = abs(x - y)
price = 0
num = 0
if x > y:
    price += d * a
    num = y
else:
    price += d * b
    num = x

if (a+b) >= 2*c:
    price += 2 * c * num
else:
    price += (a+b) * num

print(price)