s = gets.to_i

a = [0, s]

for i in 2..10**6 do
  tmp =
    if a[i-1]%2 == 0
      a[i-1]/2
    else
      3*a[i-1]+1
    end

  if a.include?(tmp)
    puts i
    exit
  else
    a[i] = tmp
  end
end
