s = gets.to_i

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


list = []
list[0] = s
i = 1
loop do
  v = f(list[i-1])
  list[i] = v
  break if v == 4
  i += 1
end

ans = 10000000
for i in 0..(list.size - 2) do
  for j in (i+1)..(list.size - 1) do
    v1 = list[i]
    v2 = list[j]
    if v1 == v2 && j < ans
      ans = j
    end
  end
end

if ans == 10000000
  ans = list.size + 3
end

puts ans