#P9502. 『MGOI』Simple Round I | A. 魔法数字

『MGOI』Simple Round I | A. 魔法数字

Background

The more determined a mage is, the luckier they are. — Hall Mage S.

Problem Description

The magic number of the junior mage Xiao M is 22.

Given a positive integer nn, Xiao M needs to find the largest even integer mm such that 2m<n2^m < n.

Please help him.

Input Format

One line containing one positive integer nn.

Output Format

One line containing one even integer mm, which is the answer.

7
2
8
2
1024
8

Hint

Constraints

For the first 20%20\% of the testdata, n=2n = 2.

For the first 60%60\% of the testdata, nn is a power of 22.

For 100%100\% of the testdata, 2n1092 \le n \le 10^9.

Translated by ChatGPT 5