using System; using System.Collections.Generic; using System.Linq; namespace PracticeAtCoder { class Program { static void Main(string[] args) { //047ビスケット String sA = Console.ReadLine(); int intX = int.Parse(sA);//希望の個数 int iMin = 1;//最小何個? int iMax = 1;//最大何個? int iX = 0;//たたいた回数 //2^x のXの数を図る //intN=15 //9<=15<=16 が同じ回数 while(!(intX <= iMax && iMin <= intX)){ iMin = iMax + 1; iMax = iMax * 2; iX++; } Console.WriteLine(iX); } } }