A,B,C,X,Y=(int(i) for i in input().split())
 
if A+B<2*C:
  print(A*X+B*Y)
  
elif min(X,Y)<=2*C:
  if X>Y:
    print((X-Y)*A+2*Y*C)
  else:
    print((Y-X)*B+2*X*C)
elif A<=B:
  if X>Y:
    print(2*C*Y+(X-Y)*A)
  else:
    orint(2*C*Y)
else:
  if X<Y:
    print(2*C*X+(Y-X)*B)
  else:
    print(2*C*X)