def even_method(n)
  n/2
end

def odd_method(n)
  3*n+1
end

S = gets.to_i

num_array = []
backet = {}
i = 0
ans = 0

loop do
  i += 1
  if i == 1
    num_array << S
    backet[S.to_s] = true
  end

  if num_array.last%2 == 0
    next_num = even_method(num_array.last)
  else
    next_num = odd_method(num_array.last)
  end

  num_array << next_num
  if backet[next_num.to_s]
    ans = i+1
    break
  else
    backet[next_num.to_s] = true
  end
end

puts ans
