local s=io.read("n")
t={}
t[1]=s
i=1
while true do
  i=i+1
  if t[i-1]%2==0 then
    t[i]=t[i-1]/2
    else
    t[i]=t[i-1]*3+1
    end
  for k=1,i-1 do
    if t[k]==t[i] then
      print(i)
      break
      end
    end
end
    
  
