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

if X < Y:
    A, B = B, A
    X, Y = Y, X

if A > 2*C:
    A = 2*C
    Y = max(Y - X, 0)
elif B > 2*C:
    B = 2*C
    X = max(X - Y, 0)

if A + B <= 2*C:
    print(A*X + B*Y)
else:
    if X > Y:
        print(A*(X - Y) + 2*C*Y)
    else:
        print(2*C*X + B*(Y - X))
