s = gets.to_i
arr = []
arr << s
while true
  if s.odd? 
    new_s = 3 * s + 1
  else
    new_s = s / 2
  end
  if arr.find_index(new_s)
    puts arr.size + 1
    exit
  end
  arr << new_s
  s = new_s
end 