A,B,C,X,Y = map(int,input().split(' '))
num = 0
if A/2 >= C  and B/2 >= C:
  if X >= Y:
    num = X*2*C
  else:
    num = Y*2*C
elif A/2 + B/2 >= C:
  if X >= Y:
    Z = X - Y
    num = C*2*Y + Z*A
  else:
    Z = Y - X
    num = C*2*X + Z*B
else:
  num = X*A+B*Y
print(num) 
    
    