//入力文字読み取り process.stdin.resume(); process.stdin.setEncoding('utf8'); process.stdin.on('data', function (chunk) { //数値に変換 var viscuit = Number(chunk); var sum = 1 var count = 0 while (true) { if (viscuit <= sum) { break; } sum *= 2 count++ } console.log(count) });