def resolve():
    A, B, C, X, Y = list(map(int, input().split()))
    if min(A, B) > C:
        print(2 * max(X, Y) * C)
        return
    if A + B > 2 * C:
        if X >= Y:
            print(2 * Y * C + max(X-Y, 0) * A)
        else:
            print(2 * X * C + max(Y-X, 0) * B)

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

    return

resolve()