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

if 2 * c < min(a, b):
    print(2 * c * max(x, y))
elif 2 * c < a + b:
    if x < y:
        print(2 * c * x + b * (y - x))
    else:
        print(2 * c * y + a * (x - y))
else:
    print(a * x + b * y)