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

price = min(A*X+B*Y, C*2*max(X, Y))

is_break = 0


if X >= Y:
    for a in range(X+1):
        if is_break:
            break
        for b in [0, Y]:
            if is_break:
                break
            for c in range(2 * max((X-a), (Y-b)), 2 * max(X-a, Y-b)+1):
                if price >= A*a+B*b+C*c:
                    price = A*a+B*b+C*c
                    is_break = 1
                    break
else:
    for a in [0, X]:
        if is_break:
            break
        for b in range(Y+1):
            if is_break:
                break
            for c in range(2 * max((X-a), (Y-b)), 2 * max(X-a, Y-b)+1):
                if price >= A*a+B*b+C*c:
                    price = A*a+B*b+C*c
                    is_break = 1
                    break
print(price)
