import java.util.*; class Main { private static final String SPLIT_STR = " "; public static void main(String[] args) { // Scanner生成 Scanner sc = new Scanner(System.in); // 入力設定 String input = sc.nextLine(); String[] split = input.split(SPLIT_STR); List numList = new ArrayList<>(split.length); for (int i = 0; i < split.length; i++) { numList.add(Integer.parseInt(split[i])); } // Scannerクローズ sc.close(); /* メイン処理開始 */ // 変数初期化 int result = 0; int N = numList.get(0); // 結果設定 result = count(1, N); /* メイン処理終了 */ // 結果出力 System.out.println(result); } private static int count(int beginNum, int endNum) { int result = 0; int total = beginNum; int add = 1; while (total < endNum) { if ((total + add) > endNum ) { add = (int)Math.ceil(endNum - total); } else { total += add; add += add; result++; } } return result; } }