input = gets.to_i
count = 1
if input == 4 or input == 1 or input == 2 then
  count = 1
else
until input==4 do
if input%2==0 then
    input = input/2
    count +=1
else
    input = input*3+1
    count +=1
end
end
end
puts count+3