N:=8;
DMKH:=SUM(IF(H-REF(C,1)>0,(H-REF(C,1))+(C-L),C-L),N);
DMKM:=SUM(IF(REF(C,1)-L>0,(REF(C,1)-L)+(H-C),H-C),N);
DMKII:DMKH/(DMKH+DMKM);
0.6;
0.5;
0.4;
N:=8;
DMKH:=SUM(IF(H-REF(C,1)>0,(H-REF(C,1))+(C-L),C-L),N);
DMKM:=SUM(IF(REF(C,1)-L>0,(REF(C,1)-L)+(H-C),H-C),N);
DMKII:DMKH/(DMKH+DMKM);
0.6;
0.5;
0.4;