#include<bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); long long n,cnt; cin>>n; while(n) { n=n>>1; cnt++; } if(cnt%2) cout<<cnt-3; else cout<<cnt-2; return 0; }