s=gets.to_i
aNumbers=[s]
index=1
fourNumberCount = 0
loop do
  tempNumber = aNumbers[index-1]
  tempANumber = tempNumber % 2 == 0 ? tempNumber/2 : tempNumber*3+1
  fourNumberCount += 1 if tempANumber == 4
  aNumbers << tempANumber
  break if fourNumberCount > 1
  index += 1
end
puts (index+1)