A,B,C,X,Y = map(int,input().split())
min_ = min(X,Y)
max_ = max(X,Y)
sum = 0

res = A*X + B*Y
for i in range(0,min_):
    sum += C * 2
if(C<=0.5 * A and C <= 0.5 * B):
    sum += 2*C*(max_-min_)
elif(max_==X):
    sum += (max_-min_)*A
else:
    sum += (max_-min_)*B
    
print(min(res,sum))