#include using namespace std; int main() { long long int n, a = 0, i = 0; cin >> n; while (1) { if (n == 1) { cout << i + a << endl; break; } if (n % 2 == 1) { n = (n - 1) / 2; i++; a = 1; } else { n = n / 2; i++; } } }