function [A_ne, exitflag]=A_ne_ss(Sro1,theta1,p_int,p_bun,xi_p,NE,INC,v_e)
options=optimset('Display','Final','TolX',1e-10,'TolFun',1e-10);
try
[A_ne,fval,exitflag]=fsolve(@(A_ne) Sro1 - (((theta1*p_int/p_bun)^(theta1/(1-theta1)))*((xi_p*(1-theta1))/(xi_p*(1-theta1)-1))*(NE*((A_ne)^(1/(1-theta1)))+ INC*((A_ne+ (v_e/(((theta1*Sro1*p_int/p_bun)^theta1)*(1-theta1*p_int))))^(1/(1-theta1))))) ,0.2,options);
exitflag=0;
catch 
A_ne=NaN;
exitflag=1;
end

             
                     