import math 
import bisect
import heapq
from collections import deque

a,b,c,x,y = map(int,input().split())
ans = 0
if (a+b) // 2 > c:
    if x > y:
        ans = 2 * y * c + a * (x-y)
    else: ans = 2 * x * c + b * (y-x)

else:
    if a > b:
        ans = b * y + min(a * x, 2 * c * x)
    else:
        ans = a * x + min(b * y, 2 * c * y)
    
print(ans)
