import math

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

answer = a * x + b * y

if answer > c * max(x, y) * 2:
    answer = c * max(x, y) * 2
elif a * min(x, y) + b * min(x, y) > c * min(x, y) * 2:
    answer -= a * min(x, y) + b * min(x, y)
    answer +=  c * min(x, y) * 2

print(str(answer))