a, b, c, x, y =map(int, input().split())
if(a/2 + b/2 > c) :
  if(min(a, b) > c*2) :
    print(max(x, y)*c*2)
  else :
    common = min(x, y)
    remine = abs(x-y)
    if(x > y) :
      print(common*c*2 + remine*a)
    else :
      print(common*c*2 + remine*b)
else :
  print(a*x+b*y)