def produit(a,b): s = 0 while b: if b&1: s += a b >>= 1 a <<= 1 return s