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