$M0 = $M1 =

the result: $M1 = 1

Be carefull !! d must not be 0.