s=gets.to_i
aNumbers=[s]
aNumberHash={}
aNumberHash.store(s,0)
index=1
loop do
  tempNumber = aNumbers[index-1]
  tempANumber = tempNumber % 2 == 0 ? tempNumber/2 : tempNumber*3+1
  aNumbers << tempANumber
  aNumberHash.key?(tempANumber) ? break : aNumberHash.store(tempANumber,0)
  index += 1
end
puts (index+1)