b=[0,1,2]
order=3
det=b[0]*b[1]*b[2]
det
if det == 0:
    r=order-1
else:
    r=order
r