s = gets.to_i
a = [s]
offset = 0

if s == 1
  offset = 2
elsif s == 2
  offset = 1
else
  offset = 3
end

while a.last != 4
  if a.last.even?
    a.push(a.last / 2)
  else
    a.push(a.last * 3 + 1)
  end
end

puts a.length + offset