=IF(J5=0,0,IF(AND(J5=1,K5=1),0,IF(J5<3,K5*10+L5*10+D5/21.75/2*M5+D5/21.75*N5,INT(J5/3)*D5/21.75+MOD(J5,3)*10)))