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

ans = float("inf")

if X > Y:
    a = 0
    b = 0
    ab = 2 * X
    while ab > 0:
        a += X - (ab / 2)
        if ab / 2 < Y:
            b = int(Y - 2 * ab)
        money = a * A + b * B + ab * C
        ans = min(ans, money)
        ab -= 2
else:
    a = 0
    b = 0
    ab = 2 * Y
    while ab > 0:
        b += Y - (ab / 2)
        if ab / 2 < X:
            a = int(X - 2 * ab)
        money = a * A + b * B + ab * C
        ans = min(ans, money)
        ab -= 2
print(int(ans))
