A:=P1+(100-P1)/2;
B:=(100-P1)/2;
CC:=COST(A);
DD:=COST(B);
SCR:=(CC-DD)/(CC+DD)*100/2;
XG:CROSS(SCR,5);