s = gets.to_i
def f(n)
  if n%2==0
    return n/2
  else
    return 3*n+1
  end
end
i = 1
ary = [s]
while i > 0 do
  ary << f(ary[i-1])
  if ary.uniq.size != ary.size
    break
  else
    i += 1
  end
end
puts i+1