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

result = 0
if C < (A // 2 + B // 2):
    result = result + 2 * C * min(X, Y)
    if Y < X and A < 2 * C:
        result = result + A * (X - Y)
    elif X < Y and B < 2 * C:
        result = result + B * (Y - X)
    else:
        result = result + 2 * C * (max(X, Y) - min(X, Y))
else:
    result = A * X + B * Y
print(result)