from sys import stdin
from sys import setrecursionlimit
setrecursionlimit(10 ** 7)

a,b,c,x,y = map(int,stdin.readline().rstrip().split())
mi = 10**10

if a+b <= 2*c:
    mi = a*x+b*y
else:
    mi = min(mi,max(x,y)*2*c)
    if x >= y:
        mi = min(mi,(x-y)*a+y*2*c)
    else:
        mi = min(mi,(y-x)*a+x*2*c)

print(mi)