a,b,c,x,y=map(int,input().split())
if 2*c>=a and 2*c>=b:
  print(x*a+y*b)
elif 2*c>=a and 2*c<b:
  if x<=y:
    print(y*c*2)
  else:
    print(y*c*2+(x-y)*a)
elif 2*c>=b and 2*c<a:
  if y<=x:
    print(x*c*2)
  else:
    print(x*c*2+(y-x)*b)
else:
  print(max(x,y)*2*c)
