n = gets.to_i m = 0 a = 0 while a < n do m += 1 a = 2**m end