function F = KBg(x)
%

F(1) = -0.4 + x(1) + x(2) + x(5) - x(6)*x(2) - x(7)*x(5) - x(8)*x(5) + x(9)*x(8)*x(5);
F(2) = -0.4 + x(3) + x(4) + (1-x(5)) - x(10)*x(4) - x(11)*(1-x(5)) - x(12)*(1-x(5)) + x(13)*x(12)*(1-x(5));
F(3) = -x(15) + 1 - x(6);
F(4) = -x(14) + (1-(x(1) + x(2) - x(6)*x(2)))/(1-x(2));
F(5) = -x(16) + 1 - x(14);
F(6) = -x(18) + 1 - x(7);
F(7) = -x(17) + (1-(x(1) + x(5) - x(7)*x(5)))/(1-x(5));
F(8) = -x(19) + 1 - x(17);
F(9) = -x(21) + 1 - x(8);
F(10) = -x(20) + (1-(x(2) + x(5) - x(8)*x(5)))/(1-x(5));
F(11) = -x(22) + 1 - x(20);
F(12) = x(24) - 1 + x(9);
F(13) = x(23)*(1-x(8)*x(5))-1+x(1)+x(8)*x(5)+x(9)*x(8)*x(5);
F(14) = x(25) - 1 + x(23);
F(15) = -x(27) + 1 - x(10);
F(16) = -x(26) + (1-(x(3) + x(4) - x(10)*x(4)))/(1-x(4));
F(17) = -x(28) + 1 - x(26);
F(18) = -x(11) + 1 - x(29);
F(19) = -x(31) + (x(29)*(-x(5) - 1 + x(3) + x(5)))/x(5);
F(20) = -x(30) + 1 - x(31);
F(21) = -x(12) + 1 - x(32);
F(22) = -x(34) + (x(32)*(-x(5) - 1 + x(4) + x(5)))/x(5);
F(23) = -x(33) + 1 - x(34);
