require "set"

s = gets.to_i
cnt = 1
prev = s
a_set = Set.new

def f(n)
  if n%2 == 0
    return n/2
  else
    return 3*n+1
  end
end

a_set << s

while true
  cnt+=1
  prev = f(prev)
  if a_set.include?(prev)
    break
  end
  a_set << prev
end

p cnt