main = readLn >>= print . f 0 where f i x | x == 1 = 1 | x <= 2^i = i | otherwise = f (i + 1) x