a, b, c, x, y = [int(i) for i in input().split()]
m = 0
if a + b > c * 2:
    if x > y:
        m += 2 * c * min(x, y) + min(a * (x - y), 2 * c * (x - y))
    else:
        m += min(b * (y - x), 2 * c * (y - x))
else:
    m += a * x + b * y
print(m)