import sys

input = sys.stdin.readline

sys.setrecursionlimit(10 ** 7)



A, B, C, X, Y = list(map(int, input().split()))



ans = 0

if X >= Y:

    ans = min(A*X+B*Y, C*(Y)*2+A*(X-Y))

else:

    ans = min(A*X+B*Y, C*(X)*2+B*(Y-X))





ans = min(ans, C*max(X, Y)*2)

print(ans)

import sys

stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)



i_i = lambda: int(i_s())

i_l = lambda: list(map(int, stdin.readline().split()))

i_s = lambda: stdin.readline().rstrip()



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



if X < Y:

    X * C + (Y - X) * B

    print((min((X * A + Y * B), (X * C * 2 + (Y - X) * B), C * max(X, Y) * 2)))

else:

    print((min((X * A + Y * B), (Y * C * 2 + (X - Y) * A), C * max(X, Y) * 2)))

    
import sys

input = sys.stdin.readline
sys.setrecursionlimit(10**7)
A, B, C, X, Y = list(map(int, input().split()))
ans = 0
if X >= Y:
    ans = min(A * X + B * Y, C * (Y) * 2 + A * (X - Y))
else:
    ans = min(A * X + B * Y, C * (X) * 2 + B * (Y - X))
ans = min(ans, C * max(X, Y) * 2)
print(ans)

import sys

stdin = sys.stdin
sys.setrecursionlimit(10**7)
i_i = lambda: int(i_s())
i_l = lambda: list(map(int, stdin.readline().split()))
i_s = lambda: stdin.readline().rstrip()
A, B, C, X, Y = i_l()
if X < Y:
    X * C + (Y - X) * B
    print((min((X * A + Y * B), (X * C * 2 + (Y - X) * B), C * max(X, Y) * 2)))
else:
    print((min((X * A + Y * B), (Y * C * 2 + (X - Y) * A), C * max(X, Y) * 2)))

-input = sys.stdin.readline +stdin = sys.stdin -A, B, C, X, Y = list(map(int, input().split())) -ans = 0 -if X >= Y: -    ans = min(A * X + B * Y, C * (Y) * 2 + A * (X - Y)) +i_i = lambda: int(i_s()) +i_l = lambda: list(map(int, stdin.readline().split())) +i_s = lambda: stdin.readline().rstrip() +A, B, C, X, Y = i_l() +if X < Y: +    X * C + (Y - X) * B +    print((min((X * A + Y * B), (X * C * 2 + (Y - X) * B), C * max(X, Y) * 2))) -    ans = min(A * X + B * Y, C * (X) * 2 + B * (Y - X)) -ans = min(ans, C * max(X, Y) * 2) -print(ans) +    print((min((X * A + Y * B), (Y * C * 2 + (X - Y) * A), C * max(X, Y) * 2)))