import sys





def input():

    return sys.stdin.readline()[:-1]





def ii(t: type = int):

    return t(eval(input()))





def il(t: type = int):

    return list(map(t, input().split()))





def imi(N: int, t: type = int):

    return [ii(t) for _ in range(N)]





def iml(N: int, t: type = int):

    return [il(t) for _ in range(N)]





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

m = A * X + B * Y

for i in range(2, 2 * max(X, Y) + 1, 2):

    tmp = A * max(X - i // 2, 0) + B * max(Y - i // 2, 0) + C * i

    if tmp < m:

        m = tmp

print(m)

import sys





def input():

    return sys.stdin.readline()[:-1]





def ii(t: type = int):

    return t(eval(input()))





def il(t: type = int):

    return list(map(t, input().split()))





def imi(N: int, t: type = int):

    return [ii(t) for _ in range(N)]





def iml(N: int, t: type = int):

    return [il(t) for _ in range(N)]





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



if A + B < 2 * C:

    print((A * X + B * Y))

    exit()

p = min(X, Y) * 2 * C

n = max(X - Y, Y - X)

if X < Y:

    p += min(2 * C * n, n * B)

else:

    p += min(2 * C * n, n * A)

print(p)

import sys


def input():
    return sys.stdin.readline()[:-1]


def ii(t: type = int):
    return t(eval(input()))


def il(t: type = int):
    return list(map(t, input().split()))


def imi(N: int, t: type = int):
    return [ii(t) for _ in range(N)]


def iml(N: int, t: type = int):
    return [il(t) for _ in range(N)]


A, B, C, X, Y = il()
m = A * X + B * Y
for i in range(2, 2 * max(X, Y) + 1, 2):
    tmp = A * max(X - i // 2, 0) + B * max(Y - i // 2, 0) + C * i
    if tmp < m:
        m = tmp
print(m)

import sys


def input():
    return sys.stdin.readline()[:-1]


def ii(t: type = int):
    return t(eval(input()))


def il(t: type = int):
    return list(map(t, input().split()))


def imi(N: int, t: type = int):
    return [ii(t) for _ in range(N)]


def iml(N: int, t: type = int):
    return [il(t) for _ in range(N)]


A, B, C, X, Y = il()
if A + B < 2 * C:
    print((A * X + B * Y))
    exit()
p = min(X, Y) * 2 * C
n = max(X - Y, Y - X)
if X < Y:
    p += min(2 * C * n, n * B)
else:
    p += min(2 * C * n, n * A)
print(p)

-m = A * X + B * Y -for i in range(2, 2 * max(X, Y) + 1, 2): -    tmp = A * max(X - i // 2, 0) + B * max(Y - i // 2, 0) + C * i -    if tmp < m: -        m = tmp -print(m) +if A + B < 2 * C: +    print((A * X + B * Y)) +    exit() +p = min(X, Y) * 2 * C +n = max(X - Y, Y - X) +if X < Y: +    p += min(2 * C * n, n * B) +else: +    p += min(2 * C * n, n * A) +print(p)