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