# https://atcoder.jp/contests/abc095/tasks/arc096_a





# A1枚→A円

# B1枚→B円

# A,B両方一枚→AB円





# もし2AB<=A+Bならmin(X,Y)になるまで買ったほうが安い

# Aだけ必要→A<AB→Aを買う、違うならABを買う

# Bだけ必要→上に同じ



# もし2AB<=A+Bでなかった場合

# A,B<ABの場合→A,Bを個別に買う

# A<2AB の場合→Aは個別で

# この議論は上に統合される



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

# 両方買うほうがお得のときは先に買っておく

ans = 0

if 2 * c <= a + b:

    n = min(x, y)

    ans += 2 * n * c

    x -= n

    y -= n



# print(x, y, ans)



# Aだけ買う

if a <= 2 * c:

    ans += x * a

else:

    ans += x * 2 * c



if b <= 2 * c:

    ans += y * b

else:

    ans += y * 2 * c

print(ans)

import sys

sys.setrecursionlimit(1 << 25)

read = sys.stdin.readline

ra = range

enu = enumerate





def read_ints():

    return list(map(int, read().split()))





def read_a_int():

    return int(read())





def read_tuple(H):

    '''

    H is number of rows

    '''

    ret = []

    for _ in range(H):

        ret.append(tuple(map(int, read().split())))

    return ret





def read_col(H):

    '''

    H is number of rows

    A列、B列が与えられるようなとき

    ex1)A,B=read_col(H)    ex2) A,=read_col(H) #一列の場合

    '''

    ret = []

    for _ in range(H):

        ret.append(list(map(int, read().split())))

    return tuple(map(list, list(zip(*ret))))





def read_matrix(H):

    '''

    H is number of rows

    '''

    ret = []

    for _ in range(H):

        ret.append(list(map(int, read().split())))

    return ret

    # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため





MOD = 10**9 + 7

INF = 2**31  # 2147483648 > 10**9

# default import

from collections import defaultdict, Counter, deque

from operator import itemgetter

from itertools import product, permutations, combinations

from bisect import bisect_left, bisect_right  # , insort_left, insort_right



# https://atcoder.jp/contests/abc095/tasks/arc096_a

A, B, C, X, Y = read_ints()



# もし組み合わせて買ったほうがいいなら限界まで組み合わせて買う

buyed = min(X, Y)

c1 = min(A + B, 2 * C) * buyed

X -= buyed

Y -= buyed



if X:

    c2 = min(A, 2 * C) * X

elif Y:

    c2 = min(B, 2 * C) * Y

else:

    c2 = 0



print((c1 + c2))

# https://atcoder.jp/contests/abc095/tasks/arc096_a
# A1枚→A円
# B1枚→B円
# A,B両方一枚→AB円
# もし2AB<=A+Bならmin(X,Y)になるまで買ったほうが安い
# Aだけ必要→A<AB→Aを買う、違うならABを買う
# Bだけ必要→上に同じ
# もし2AB<=A+Bでなかった場合
# A,B<ABの場合→A,Bを個別に買う
# A<2AB の場合→Aは個別で
# この議論は上に統合される
a, b, c, x, y = list(map(int, input().split()))
# 両方買うほうがお得のときは先に買っておく
ans = 0
if 2 * c <= a + b:
    n = min(x, y)
    ans += 2 * n * c
    x -= n
    y -= n
# print(x, y, ans)
# Aだけ買う
if a <= 2 * c:
    ans += x * a
else:
    ans += x * 2 * c
if b <= 2 * c:
    ans += y * b
else:
    ans += y * 2 * c
print(ans)

import sys

sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_tuple(H):
    """
    H is number of rows
    """
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_col(H):
    """
    H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) #一列の場合
    """
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, list(zip(*ret))))


def read_matrix(H):
    """
    H is number of rows
    """
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため


MOD = 10**9 + 7
INF = 2**31  # 2147483648 > 10**9
# default import
from collections import defaultdict, Counter, deque
from operator import itemgetter
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  # , insort_left, insort_right

# https://atcoder.jp/contests/abc095/tasks/arc096_a
A, B, C, X, Y = read_ints()
# もし組み合わせて買ったほうがいいなら限界まで組み合わせて買う
buyed = min(X, Y)
c1 = min(A + B, 2 * C) * buyed
X -= buyed
Y -= buyed
if X:
    c2 = min(A, 2 * C) * X
elif Y:
    c2 = min(B, 2 * C) * Y
else:
    c2 = 0
print((c1 + c2))

+import sys + +sys.setrecursionlimit(1 << 25) +read = sys.stdin.readline +ra = range +enu = enumerate + + +def read_ints(): +    return list(map(int, read().split())) + + +def read_a_int(): +    return int(read()) + + +def read_tuple(H): +    """ +    H is number of rows +    """ +    ret = [] +    for _ in range(H): +        ret.append(tuple(map(int, read().split()))) +    return ret + + +def read_col(H): +    """ +    H is number of rows +    A列、B列が与えられるようなとき +    ex1)A,B=read_col(H)    ex2) A,=read_col(H) #一列の場合 +    """ +    ret = [] +    for _ in range(H): +        ret.append(list(map(int, read().split()))) +    return tuple(map(list, list(zip(*ret)))) + + +def read_matrix(H): +    """ +    H is number of rows +    """ +    ret = [] +    for _ in range(H): +        ret.append(list(map(int, read().split()))) +    return ret +    # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため + + +MOD = 10**9 + 7 +INF = 2**31  # 2147483648 > 10**9 +# default import +from collections import defaultdict, Counter, deque +from operator import itemgetter +from itertools import product, permutations, combinations +from bisect import bisect_left, bisect_right  # , insort_left, insort_right + -# A1枚→A円 -# B1枚→B円 -# A,B両方一枚→AB円 -# もし2AB<=A+Bならmin(X,Y)になるまで買ったほうが安い -# Aだけ必要→A<AB→Aを買う、違うならABを買う -# Bだけ必要→上に同じ -# もし2AB<=A+Bでなかった場合 -# A,B<ABの場合→A,Bを個別に買う -# A<2AB の場合→Aは個別で -# この議論は上に統合される -a, b, c, x, y = list(map(int, input().split())) -# 両方買うほうがお得のときは先に買っておく -ans = 0 -if 2 * c <= a + b: -    n = min(x, y) -    ans += 2 * n * c -    x -= n -    y -= n -# print(x, y, ans) -# Aだけ買う -if a <= 2 * c: -    ans += x * a +A, B, C, X, Y = read_ints() +# もし組み合わせて買ったほうがいいなら限界まで組み合わせて買う +buyed = min(X, Y) +c1 = min(A + B, 2 * C) * buyed +X -= buyed +Y -= buyed +if X: +    c2 = min(A, 2 * C) * X +elif Y: +    c2 = min(B, 2 * C) * Y -    ans += x * 2 * c -if b <= 2 * c: -    ans += y * b -else: -    ans += y * 2 * c -print(ans) +    c2 = 0 +print((c1 + c2))