Count Trailing Zeros in Binary
You are given an integer n
(in base-10). Write a program to find the number of trailing zeros when n
is converted to its binary representation.
Input
The input contains a single integer n
(1 ≤ n ≤ ).
Output
The program should print the number of trailing zeros in the binary representation of n
.
Examples
Input | Output |
---|---|
12 | 2 |
456 | 3 |
Constraints
Time limit: 2 seconds
Memory limit: 512 MB
Output limit: 1 MB