S = map(int, raw_input().split())
A = S[0]
B = S[1]
C = S[2]
X = S[3]
Y = S[4]

total = 0

if X > Y:
    A = S[1]
    B = S[0]
    X = S[4]
    Y = S[3]

if A > C * 2:
    total += C * 2 * X
    Y -= X
    X = 0

if B > C * 2:
    total += C * 2 * Y
    Y = 0

if A + B > C * 2:
    total += C * 2 * X
    Y -= X
    X = 0

total += A * X + B * Y

print(total)
