import sys
a,b,c,x,y=map(int,input().split())
val=0
if a+b<=2*c:
  print(a*x+b*y)
  sys.exit()
else:
  val+=min(x,y)*c*2
  x-=min(x,y)
  y-=min(x,y)
  if x==0:
    val+=min(min(b*y,y*2*c),((y-1)*2*c)+b)
  if y==0:
    val+=min(min(a*x,x*2*c),((x-1)*2*c)+a)
  print(val)
  sys.exit()