a,b,c,x,y=map(int, input().split())
mc=min(a,b,c)
mp=max(x,y)
cost=10000000000
if mc==c:
  for i in range(mp):
    cost_=(mp-i)*2*c+min(a,b)*i
    if cost_ > cost:
      #print(cost)
      break;
    else:
      cost=cost_
  print(cost)
if mc==a:
  for i in range(x):
    cost_=(x-i)*a+b*(y-i)+c*2*i
    if cost_ > cost:
      #print(cost)
      break;
    else:
      cost=cost_
  print(cost)  
if mc==b:
  for i in range(y):
    cost_=(x-i)*a+b*(y-i)+c*2*i
    if cost_ > cost:
      #print(cost)
      break;
    else:
      cost=cost_
  print(cost)  