function   f=bankss(xx, betta, sigmma, gama, thetta, Rsss)

x = xx(1);
phi = xx(2);
Rc = xx(3);

R = 1/betta;
psi = thetta*(1+gama*x^2/2)*phi;
mu = betta*(1-sigmma+sigmma*psi)*(Rc-R);
mus = betta*(1-sigmma+sigmma*psi)*(R-Rsss);

% Equation system
f1 = phi-(1-sigmma+sigmma*psi)/(thetta*(1+gama*x^2/2)-(mu+mus*x));
f2 = x+mu/mus-((mu/mus)^2+2/gama)^(1/2);
f3 = 1/phi-sigmma*Rc+sigmma/betta*(1-1/phi-x)+sigmma*Rsss*x;

f=[f1;f2;f3];