#define _CRT_SECURE_NO_WARNINGS
#include<sstream>
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<cmath>
#include<string>
#include<vector>
#include<set>
#include<map>
#include<queue>
#include<numeric>
#include<functional>
#include<algorithm>
#include<bitset>
#include<tuple>
#include<unordered_set>
#include<random>
using namespace std;
#define INF (1<<29)
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define uniq(v) v.erase(unique(all(v)),v.end())
#define indexOf(v,x) (find(all(v),x)-v.begin())



inline int popcount64(unsigned long long x) {
	x = (x >> 1 & 0x5555555555555555ULL) + (x & 0x5555555555555555ULL);
	x = (x >> 2 & 0x3333333333333333ULL) + (x & 0x3333333333333333ULL);
	x = (x >> 4 & 0x0f0f0f0f0f0f0f0fULL) + (x & 0x0f0f0f0f0f0f0f0fULL);
	x = (x >> 8 & 0x00ff00ff00ff00ffULL) + (x & 0x00ff00ff00ff00ffULL);
	x = (x >> 16 & 0x0000ffff0000ffffULL) + (x & 0x0000ffff0000ffffULL);
	return ((x >> 32) + (x & 0xffffffff));
}

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	long long n;
	cin >> n;
	n |= n >> 1;
	n |= n >> 2;
	n |= n >> 4;
	n |= n >> 8;
	n |= n >> 16;
	n |= n >> 32;
	cout << popcount64(n) << endl;


	return 0;
}