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