(defun main (&rest argv) (declare (ignorable argv)) (let* ((L (read))) (labels ((rec (x y z) (if (<= (* 8 x (+ x y)) z) (+ (mod (+ x y) 2) (rec (+ x y) x z) (rec (+ x y) y z)) 0))) (format t "~d~%" (rec 2 1 L))))) (main)