#abc354a. A - Exponential Plant

A - Exponential Plant

Score : 100100 points

问题陈述

高桥正在种植一株植物。它在发芽时的高度是 0cm0\,\mathrm{cm}。将发芽的那天视为第 00 天,它在第 ii 天的夜晚高度增加 2icm2^i\,\mathrm{cm} (0i)(0 \le i)

高桥的身高是 HcmH\,\mathrm{cm}

每天早上,高桥都会用这株植物来测量他的身高。找出植物的高度首次严格超过高桥早上身高的那一天。

以上为大语言模型 kimi 翻译,仅供参考。

Problem Statement

Takahashi is growing a plant. Its height at the time of germination is 0cm0\,\mathrm{cm}. Considering the day of germination as day 00, its height increases by 2icm2^i\,\mathrm{cm} day ii's night (0i)(0 \le i).

Takahashi's height is HcmH\,\mathrm{cm}.

Every morning, Takahashi measures his height against this plant. Find the first day such that the plant's height is strictly greater than Takahashi's height in the morning.

Constraints

  • 1H1091 \leq H \leq 10^{9}
  • All input values are integers.

Input

The input is given from Standard Input in the following format:

HH

Output

Print an integer representing the first day such that the plant's height is greater than Takahashi's height in the morning.

Sample Input 1

54

Sample Output 1

6

The plant's height in the mornings of days 1,2,3,4,5,61, 2, 3, 4, 5, 6 will be $1\,\mathrm{cm}, 3\,\mathrm{cm}, 7\,\mathrm{cm}, 15\,\mathrm{cm}, 31\,\mathrm{cm}, 63\,\mathrm{cm}$, respectively. The plant becomes taller than Takahashi in the morning day 66, so print 66.

Sample Input 2

7

Sample Output 2

4

The plant's height will be 7cm7\,\mathrm{cm} in the morning of day 33 and 15cm15\,\mathrm{cm} in the morning day 44. The plant becomes taller than Takahashi in the morning of day 44, so print 44. Note that, in the morning of day 33, the plant is as tall as Takahashi, but not taller.

Sample Input 3

262144

Sample Output 3

19