# 18:32
a, b, c, x, y = map(int, input().split())

mxy = max(x, y)
sxy = min(x, y)
sum = 0
if a+b-2*c > 0:
    sum += c*min(x, y)*2
    if x > y and a < 2*c:
        sum += (max(x, y)-min(x, y))*a
    elif x > y:
        sum += (max(x, y)-min(x, y))*2*c
    elif x <= y and a < 2*c:
        sum += (max(x, y)-min(x, y))*b
    elif x <= y:
        sum += (max(x, y)-min(x, y))*2*c

else:
    sum = a*x+b*y
print(sum)
