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

ans=0
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

print(ans)