require 'set'; require 'prime'
INF=Float::INFINITY; MOD=10**9+7
s = gets.chomp.to_i


def f(n)
  if n.even?
    ret = n/2
  else
    ret = 3 * n + 1
  end
end

i = 1
pre = s
cache = {}
set = Set.new
set.add s
while true
  ret = f(pre)
  # p [i, pre, ret, set]
  if set.include? ret
    puts i + 1
    exit
  end
  set.add ret
  pre = ret
  i+=1
end