s = gets.to_i
counter = 1
arr = [s]

while true
  if arr[counter-1].even?
    arr << arr[counter-1] / 2
  else
    arr << arr[counter-1]*3 +1
  end
  counter += 1

  break if arr.index(4)
end

p arr.index(4) + 4
