def max_power_of_two(x):
 exponent = 0
 while x:
  x = (x >> 1)
  exponent += 1
 return max((exponent - 1), 0)

def max_power_of_two ( x ) : exponent = 0 while x : x = ( x >> 1 ) exponent += 1 return max ( ( exponent - 1 ) , 0 )
return the highest exponent of two .