def biti(n): numarator = 0 while n != 0: rest = n%2 if rest == 1: numarator +=1 n = n//2 return numarator