#include <bits/stdc++.h>
using namespace std;
long long const M = 2e5 + 10, M2 = 1e5 + 10, mod = 1e9 + 7, inf = 1e9 + 10;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long tmp = 1;
  for (long long i = 1;; i++) {
    if (tmp - 1 >= n) return cout << i - 1, 0;
    tmp *= 2;
  }
}
