function f = drh1nkss(xx,eta,beta,delta,h,sigma,phi,psi,thetaw,thetap,upsilon,DS,LS,KS,alphal,alphak)

L = xx(1);

eta = 1.2;
beta = 0.99;
delta = 0.025;
h = 0.65;
sigma = 2;
phi = 1;
psi=1;
thetaw =0.75;
thetap=0.75;
upsilon =1;
alphal=0.6;
alphak=1-alphal;
DS =0.1;
LS =(1-DS)*alphal;
KS =1-LS-DS;

%L=1;

Rk= (1/beta - (1-delta))/upsilon;
mp=alphak*KS^(-1/eta)*Rk^((1-eta)/eta);
Y=(alphal/mp/LS)^(eta/(eta-1))*L;
W=LS*Y/L;
epsilonp = mp/(mp-1);
mw = 1/W/mp;
%mw=mp;
epsilonw = mw/(mw-1);
K=KS*Y/Rk;
Inv=delta*K;
X = Inv/upsilon;
C = Y - X;
D=DS*Y;
lambda = (C-h*C)^(-sigma)-beta*h*(C-h*C)^(-sigma);
H1 = psi*L^(1+phi)/(1-thetaw*beta);
H2 = lambda*L/(1-thetaw*beta);
mc= 1/mp;
X1 = lambda*mc*Y/(1-thetap*beta);
X2 = lambda*Y/(1-thetap*beta);

% equations
f1 = (Y^((eta-1)/eta)-alphak*K^(eta/(eta-1))/alphal)^(eta/(eta-1));
f = [f1];
