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

pat1 = 0
pat2 = 0
pat3 = 0
pat4 = 0
pat5 = 0

ans = []

if a+b >= c*2:
  if x >= y:
    pat1 = y * 2 * c
    x -= y
    pat1 += x * a 
    x += y
    
    pat2 = x * 2 * c
    
  elif a+b <= c*2:
    pat3 = x * 2 * c
    y -= x
    pat3 += x * a + y * b
    y += x
    
    pat4 = y * 2 * c
else:
  pat5 += x * a + y * b

ans.extend([pat1, pat2, pat3, pat4, pat5])
ans = [i for i in ans if i!= 0]
  
print(min(ans))