a, b, c, x, y = map(int, input().split())
def fnc(u):
    global x, y
    if u == x:
        return a
    else:
        return b
s, t = min(x, y), max(x, y) 
p = fnc(s)
q = fnc(t)
a,b = p, q
x, y = s, t
ans = a*x + b*y
for i in range(y+1):
    temp = 2*c*i + max(x-i, 0)*a+ (y-i)*b
    ans = min(ans, temp)
print(ans)
