from sys import stdin

import numpy as np

a,b,c,x,y= [int(x) for x in stdin.readline().rstrip().split()]



if x >= y:

    print((min(a*x+b*y,c*2*y+a*(x-y),c*2*x)))

else:

    print((min(a*x+b*y,c*2*x+b*(y-x),c*2*y)))
from sys import stdin

from sys import setrecursionlimit

setrecursionlimit(10 ** 7)



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

mi = 10**10



mi = min(mi,max(x,y)*2*c)

mi = min(mi,a*x+b*y)



if x >= y:

    mi = min(mi,y*2*c+(x-y)*a)

else:

    mi = min(mi,x*2*c+(y-x)*b)



print(mi)
from sys import stdin
import numpy as np

a, b, c, x, y = [int(x) for x in stdin.readline().rstrip().split()]
if x >= y:
    print((min(a * x + b * y, c * 2 * y + a * (x - y), c * 2 * x)))
else:
    print((min(a * x + b * y, c * 2 * x + b * (y - x), c * 2 * y)))

from sys import stdin
from sys import setrecursionlimit

setrecursionlimit(10**7)
a, b, c, x, y = list(map(int, stdin.readline().rstrip().split()))
mi = 10**10
mi = min(mi, max(x, y) * 2 * c)
mi = min(mi, a * x + b * y)
if x >= y:
    mi = min(mi, y * 2 * c + (x - y) * a)
else:
    mi = min(mi, x * 2 * c + (y - x) * b)
print(mi)

-import numpy as np +from sys import setrecursionlimit -a, b, c, x, y = [int(x) for x in stdin.readline().rstrip().split()] +setrecursionlimit(10**7) +a, b, c, x, y = list(map(int, stdin.readline().rstrip().split())) +mi = 10**10 +mi = min(mi, max(x, y) * 2 * c) +mi = min(mi, a * x + b * y) -    print((min(a * x + b * y, c * 2 * y + a * (x - y), c * 2 * x))) +    mi = min(mi, y * 2 * c + (x - y) * a) -    print((min(a * x + b * y, c * 2 * x + b * (y - x), c * 2 * y))) +    mi = min(mi, x * 2 * c + (y - x) * b) +print(mi)