s = gets.to_i

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

used = {}
found = false
n = s
i = 1
while true
  if used[n]
    puts i
    exit 0
  end
  used[n] = true
  n = f(n)
  i += 1
end
