def f(n) if n.odd? 1 else f(n / 2) + 1 end end puts f(gets.to_i)