function f = drh1nkss(xx,alpha,betaa,delta,psi,theta,epsilon,pii_ss,tau)

k = xx(1);
c = xx(2);

p2 = 1;
p1 = 1;
mc = 1/theta;
r = 1/betaa-1+delta;
R = pii_ss/betaa;
i = delta*k;
lambda = 1/c;

w = (mc/(1/alpha)^alpha/(1/(1-alpha))^(1-alpha)/r^alpha)^(1/(1-alpha));
h = (lambda*w/tau)^(1/psi);
y = k^alpha*h^(1-alpha);
fd = lambda*y/(1-betaa*epsilon);
kd = lambda*y*theta*mc/(1-betaa*epsilon);

f1 = w/r-(1-alpha)/alpha*k/h;
f2 = y-c-i;
f = [f1;f2];
