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

AandB = X * A + Y * B
allC = max(X, Y) * 2 * C  # すべてAB

offset = min(X, Y) * 2  # 余らない最小個数
X -= min(X, Y)
Y -= min(X, Y)

comb = offset * C
if X > 0:
    comb += X * A
else:
    comb += Y * B

print(min(AandB, allC, comb))