using System; using System.Linq; namespace TestConsole { class Program { static void Main(string[] args) { var input = int.Parse(Console.ReadLine()); int count = -1; if (input > 1) { count++; if (input % 2 == 1) { count++; input--; } count += (int)Math.Ceiling(Math.Log(input / 2, 2)); } Console.WriteLine(count + 1); } } }