# Author:
# Date: 
# Exam 1, Problem 2 (7 of 20 points)

""" This program takes one positive integer command line argument, n, and
prints the largest power of 2 that n is evenly divisible by. For example,
12 is divisible by 4 (2^2) but not 8 (2^3), so the correct output is 2.

Example runs:

>>> %Run px.py 12
2
>>> %Run px.py 6
1
>>> %Run p1.py 16
4
>>> %Run p1.py 48
4
>>> %Run p1.py 1
0
>>>

"""

import sys

n = int(sys.argv[1])

power = 0

while n % 2**power == 0:
    power += 1
    
print(power-1)
