a,b,c,x,y=map(int,input().split())

ans=0
if a+b>2*c:
  if 2*c<a and 2*c<b:
    for i in range(0,2*max(x,y)):
      ans+=c
  else:
    for i in range(0,2*min(x,y)):
      ans+=c
    if x>y:
      for i in range(0,x-y):
        ans+=a
    else:
      for i in range(0,y-x):
        ans+=b
else:
  for i in range(0,x):
    ans+=a
  for i in range(0,y):
    ans+=b
print(ans)