s = gets.to_i; arr = []; ans = 0
arr[0] = s; i = 1
while ans == 0 do
  if arr[i-1].even?
    arr[i] = arr[i-1]/2
  elsif arr[i-1].odd?
    arr[i] = arr[i-1]*3+1
  end
  0.upto(i-1) do |j|
    if arr[j] == arr[i]
      ans = i + 1
    end
  end
  i += 1
end
puts ans
