local _i={}
for i=1,1 do
    local a=io.read()
    _i[i]={}
    for s in string.gmatch(a,"%S+")do
        _i[i][#_i[i]+1]=s
    end
end

local s=tonumber(_i[1][1])
if(s==1 or s==2)then
  print(4)
  return
end
local i=1
while true do
  if(s==4)then
  	print(i+3)
  	return
  elseif(s%2==0)then
  	s=s*.5
  else
  	s=3*s+1
  end
  i=i+1
end