传统题 1000ms 256MiB

CTZ

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Problem Statement

For a positive integer XX, let ctz(X)ctz(X) be the (maximal) number of consecutive zeros at the end of the binary notation of XX. If the binary notation of XX ends with a 11, then ctz(X)=0ctz(X)=0.

You are given a positive integer NN. Print ctz(N)ctz(N).

Constraints

  • 1N1091≤N≤10^9
  • NN is an integer.

Input

The input is given from Standard Input in the following format:

N

Output

Print ctz(N)ctz(N).


2024
3

20242024 is 11111101000 in binary, with three consecutive 0s from the end, so ctz(2024)=3ctz(2024)=3. Thus, print 33.


18
1

1818 is 10010 in binary, so ctz(18)=1ctz(18)=1.

Note that we count the trailing zeros.


5
0

Programming exercise on 21 August

未参加
状态
已结束
规则
XCPC
题目
4
开始于
2024-8-21 17:30
结束于
2024-8-21 18:30
持续时间
1 小时
主持人
参赛人数
2