#include #include #include #include #include using namespace std; int main() { int n,ans = 0; cin >> n; while(1){ int a = n%2; n /= 2; n += a; ans++; if(n == 1)break; } cout << ans << endl; return 0; }