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