a, = map(int,input().split()) while (a & -a) != a: a += a & -a print(a.bit_length()-1)