using System; public class No47 { public static void Main() { int bis = int.Parse(Console.ReadLine()); int count = 0; int temp = 0; int now = 1; while( now != bis ){ temp = 1; while( (temp * 2) + now < bis ){ temp*= 2; count++; } now+= temp; } Console.WriteLine(count); } }