Divisions by 2 Problem

Divisions by 2 Problem — ExecCode School DSA Practice

Solve the Divisions by 2 problem on ExecCode. Free online school DSA practice in Combined Simple Logic. Write and run code in Java, C++, Python — no signup required to run.

Problem description

You are given one whole number N. Your task is to count how many times you can divide N by 2 until it is no longer divisible by 2. Print that count.

Examples

Input 8; Output 3. Input 10; Output 1

Constraints

1 <= N <= 10^6

Practice Divisions by 2 free on ExecCode. Browse DSA problems, topic map, and placement guides.