#include <iostream>
#include <fstream>
#include <cstring>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <vector>
#include <stack>
#include <list>	
#include <algorithm>
#include <limits.h>

using namespace std;

int main(){;
	int n;

	cin >> n;
	if (n <= 1){
		cout << 0 << endl;
	}
	else if(n % 2 == 0){
		cout << ceil(log2(n)) << endl;
	} else {
		cout << ceil(log2(n - 1)) + 1 << endl;

	}

}