A,B,C,X,Y = map(int,input().split())
if A+B <= 2*C:
    print(A*X+B*Y)
else:
    if X <= Y:
        if B <= C:
            print(X*2*C+(Y-X)*B)
        else:
            print(2*Y*C)
    else:
        if A <= C:
            print(Y*2*C+(X-Y)*A)
        else:
            print(2*Y*C)