using System; class Program { public static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); if (n == 1) { Console.WriteLine(0); return; } bool[] bits = new bool[32]; int maxBits = 0; for(int i = 0; i < 32;i++) { if ((n & (1 << i)) == 1 << i) { bits[i] = true; maxBits = Math.Max(maxBits, i); } } bool hasMore = false; for (int i = maxBits-1; i >= 0; i--) { if (bits[i]) { hasMore = true; } } if (hasMore) { Console.WriteLine(maxBits+1); return; } Console.WriteLine(maxBits); } }