s = gets.to_i

def f(n)
  n % 2 == 0 ? n / 2 : 3 * n + 1
end

hash = {}

count = 1
found = false
n = f(s)
while !found do
  if hash[n]
    puts count + 1
    found = true
  else
    hash[n] = 1
    count += 1
    n = f(n)
  end
end
