a, b, c, x, y = map(int, input().split())
if a + b <= 2 * c:
    print(a * x + b * y)
elif c <= min(a, b):
    print(2 * c * max(x, y))
else:
    if x < y:
        print(2 * c * x + (y - x) * b)
    else:
        print(2 * c * y + (x - y) * a)