This page is still under construction.

Parts of this page are still being built. What you see may change.

New Language CC

Interview

Time limit1sMemory limit512 MB

Summary
Given an integer n, print how many bits CC needs to store it after dropping leading zeros, with 0 stored in 1 bit.
Level

Easy2 of 10

Topics
Bit manipulation, Math, Implementation
Solved
No attempts yet

Problem

In C, an int variable is stored as a binary number in 32 bits using two's complement.

For example, the integer 10 is stored as 0000 0000 0000 0000 0000 0000 0000 1010.

However, the world-shaking new language CC, to save memory, does not store the leading consecutive zeros when storing an int variable. That is, the integer 10 is stored as 1010. Every other aspect of storage is the same as in C.

Print the number of bits needed to store an integer n in CC. If n is 0, store it as 0 using 1 bit.

Input

The integer n to store in the language CC is given.

Output

Print the number of bits needed to store the variable n.

Constraints

  • -2,147,483,648 ≤ n ≤ 2,147,483,647

Examples1

  1. Example 1

    Input
    10
    
    Expected output
    4