#include #include using namespace std; int tataku(int n) { int temp1 = 1; int temp2 = n - 1; int temp3 = 0; while (temp2 > 0){ temp2 -= temp1; //食べた枚数を引く temp1 *= 2; //乗算 temp3++; //回数 } return temp3; } int main() { int n; cin >> n; cout << tataku(n) << endl; //for (int n = 1; n <= 10; ++n) { // cout << n << ": " << tataku(n) << endl; //} return 0; }