function [ys,check] = rbc_monopolistic_steadystate(ys,exe)

global M_
%%Here we load the values of the deep parameters in a loop.
NumberOfParameters = M_.param_nbr;                            % Number of deep parameters.
for i = 1:NumberOfParameters                                  % Loop...
  paramname = deblank(M_.param_names(i,:));                   %    Get the name of parameter i. 
  eval([ paramname ' = M_.params(' int2str(i) ');']);         %    Get the value of parameter i.
end                                                           % End of the loop.  
check = 0;

%% steady-state calculations
modelParams = [bet epsi delta alfa rho sig epsilon];

l_ss = fsolve(@(l) res_lss(l, modelParams), 0.5);
%%other steady-states given l_ss:
r_ss   = 1/bet-1+delta;
k_ss   = l_ss*( r_ss/((epsilon-1)/epsilon*alfa) )^(1/(alfa-1));
w_ss   = (epsilon-1)/epsilon*(1-alfa)*(k_ss/l_ss)^alfa;
y_ss   = k_ss^alfa*l_ss^(1-alfa);
i_ss   = delta*k_ss;
c_ss   = (1-l_ss)*w_ss/epsi;
y_l_ss = y_ss/l_ss;
z_ss   = 0;
e_ss   = 0;
%%
l   = l_ss;
r   = r_ss;
k   = k_ss;
w   = w_ss;
y   = y_ss;
i   = i_ss;
c   = c_ss;
y_l = y_l_ss;
z   = z_ss;
e   = e_ss;
%%checking that static equations are satisfied at steady-state:
%{
  (1/c) - ( bet*(1/c)*(1+r-delta) )
  epsi*c/(1-l) - ( w )
  c+i - ( y )
  y - ( (k^alfa)*(exp(z)*l)^(1-alfa) )
  w - ( y*((epsilon-1)/epsilon)*(1-alfa)/l )
  r - ( y*((epsilon-1)/epsilon)*alfa/k )
  i - ( k-(1-delta)*k )
  y_l - ( y/l )
  z - ( rho*z+sig*e )
%}
%%
NumberOfEndogenousVariables = M_.endo_nbr;                    % Number of endogenous variables.
ys = zeros(NumberOfEndogenousVariables,1);                    % Initialization of ys (steady state).
for i = 1:NumberOfEndogenousVariables                         % Loop...
  varname = deblank(M_.endo_names(i,:));                      %    Get the name of endogenous variable i.                     
  eval(['ys(' int2str(i) ') = ' varname ';']);                %    Get the steady state value of this variable.
end                                                           % End of the loop.