(define (depth-weird x)
  (define (iter ctr x)
    (cond
      ((= x 1) ctr)
      ((even? x) (iter (+ ctr 1) (/ x 2)))
      (else (iter (+ ctr 1) (+ (* 3 x) 1)))))
  (iter 1 x))