#C2689. Binary Digit Counter
Binary Digit Counter
Binary Digit Counter
You are given an integer \(N\) such that \(1 \le N \le 100\). Your task is to determine the number of digits in the binary representation of \(N\). In other words, if the binary representation of \(N\) is denoted as \(b_1b_2\ldots b_d\) (without the leading zeros), you need to compute \(d\) where \(2^{d-1} \le N < 2^d\).
For example, if \(N=5\), its binary representation is 101
which has 3 digits, so the answer is 3.
inputFormat
The input is provided via standard input and consists of a single integer \(N\) on one line. It is guaranteed that \(1 \le N \le 100\).
outputFormat
Output the number of digits in the binary representation of \(N\) to standard output. For example, if the binary representation is 101
, you should output 3
.
1
1