function err = KB84Fs(x)
%

F(1) = -0.20687+x(1);
F(2) = -0.69775+x(5);
F(3) = -0.9878+(1-x(5))+x(2)+x(3)+x(4)-(1-x(5))*x(2)-(1-x(5))*x(3)-(1-x(5))*x(4)-x(2)*x(3)-x(2)*x(4)-x(3)*x(4)+(1-x(5))*x(2)*x(3)+(1-x(5))*x(2)*x(4)+(1-x(5))*x(3)*x(4)+x(2)*x(3)*x(4)-(1-x(5))*x(2)*x(3)*x(4);
F(4) = -0.76705+(1-x(2))+x(5)-(1-x(2))*x(5);
F(5) = -0.92633+(1-x(5))+(1-x(1))+x(4)-(1-x(5))*(1-x(1))-(1-x(5))*x(4)-(1-x(1))*x(4)+(1-x(5))*(1-x(1))*x(4);
F(6) = -0.95325+(1-x(3))+x(1)+x(2)+x(5)-(1-x(3))*x(1)-(1-x(3))*x(2)-(1-x(3))*x(5)-x(1)*x(2)-x(1)*x(5)-x(2)*x(5)+(1-x(3))*x(1)*x(2)+(1-x(3))*x(1)*x(5)+(1-x(3))*x(2)*x(5)+x(1)*x(2)*x(5)-(1-x(3))*x(1)*x(2)*x(5);
F(7) = -0.60664+(1-x(2))+x(4)-(1-x(2))*x(4);
F(8) = -0.77074+x(2);
F(9) = -0.7429+(1-x(3))+x(5)-(1-x(3))*x(5);
F(10) = -0.95901+(1-x(3))+(1-x(2))+(1-x(1))+x(5)-(1-x(3))*(1-x(2))-(1-x(3))*(1-x(1))-(1-x(3))*x(5)-(1-x(2))*(1-x(1))-(1-x(2))*x(5)-(1-x(1))*x(5)+(1-x(3))*(1-x(2))*(1-x(1))+(1-x(3))*(1-x(2))*x(5)+(1-x(3))*(1-x(1))*x(5)+(1-x(2))*(1-x(1))*x(5)-(1-x(3))*(1-x(2))*(1-x(1))*x(5);
F(11) = -0.9867+(1-x(4))+x(1)+x(2)+x(3)-(1-x(4))*x(1)-(1-x(4))*x(2)-(1-x(4))*x(3)-x(1)*x(2)-x(1)*x(3)-x(2)*x(3)+(1-x(4))*x(1)*x(2)+(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