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

s = gets.chomp.to_i
n = 1_000_000

a = []
a[0] = s
(1..(n - 1)).each do |i|
end

flg = 0
(0..(n - 1)).each do |i|
  a[i] = func(a[i - 1])
  (0..(i - 1)).each do |j|
    if a[i] == a[j]
      puts (i + 2)
      flg = 1
      break
    end
  end
  break if flg == 1
end