s = gets.chomp.to_i
#初期化
a = s
a_array = []
iterater = 1
a_array.push(a)

while true
  iterater += 1
  if a % 2 > 0
    a = 3 * a + 1
  else
    a = a / 2
  end
  if a_array.include?(a)
    break
  else
    a_array.push(a)
  end
end

print("#{iterater}\n")