s = gets.to_i
an = s
count = 1
while true
  if an < 10
    case an 
    when 1
      result = count+3
    when 2
      result = count+3
    when 3
      result = count+8
    when 4
      result = count+3
    when 5
      result = count+6
    when 6
      result = count+9
    when 7
      result = count+17
    when 8
      result = count+4
    when 9
      result = count+20
    end
    break
  end
  if an%2 == 0
    an = an/2
  else
    an = 3*an+1
  end
  count +=1
end
puts result