#include<iostream>
using namespace std;
int count1(int n) {
if (n <= 1) return 0;
int count = 0;
while (n > 1) {
if (n % 2 == 1)
count += 2;
else
count += 1;
n /= 2;
}
return count;
}
void main() {
int a = 11;
cout << count1(a)<<endl;
system("pause");
}