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

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


  break if arr.index(4)
end

p arr.index(4) + 4