#include #include int main(void){ int n,ans=0,max=1; scanf("%d",&n); while(n>max*2) max *= 2; if((n-max)%2 == 0) ans = log2(max) + 1; else if(n-max == 1) ans = log2(max) + 1; else ans = log2(max) + 2; printf("%d\n",ans); return 0; }