a,b,c,x,y = list(map(int,input().split()))
cost = []
tmp = 0
i = 0
# i == Cの数
while i <= max(x,y) :
    tmp += i * 2 * c
    if i >= x :
        tmp += (y-i) * b
    elif i >= y:
        tmp += (x-i) * a
    else:
        tmp += (x - i) * a + (y - i) * b
    cost.append(tmp)
    i += 1
    tmp = 0

print(min(cost))
    
