local s = io.read("n")
local i = 1
while true do
  if (s == 4 or s == 1 or s == 2) then
    print(i + 3)
    break
  end
  i = i + 1
  if (s % 2 == 0) then
    s = s // 2
  else
    s = s * 3 + 1
  end
end