s = gets.to_i
ans  = []
ans[0] = s
1000000.times do |i|
  if ans[i] % 2 != 0
    ans[i+1] = 3 * ans[i] + 1
  else
    ans[i+1] = ans[i] / 2
  end
    (i+1).times do |j|
      if ans[j] == ans[i+1]
        puts (i+2)
        exit
      end
   end
end
