function w = functioni(x,iss,gammai,rhoi,p_hss,p_fss)
w=[(gammai^(1/rhoi)*x(1)^((rhoi-1)/rhoi)+(1-gammai)^(1/rhoi)*x(2)^((rhoi-1)/rhoi))^(rhoi/(rhoi-1))-iss
    x(1)/x(2)-gammai/(1-gammai)*(p_hss/p_fss)^(-rhoi)];

