#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long double temp;
  temp = log2(n + 1);
  if (temp == (int)temp) {
    cout << temp << endl;
  } else {
    cout << (int)(temp) + 1 << endl;
  }
}
