(defun main (&rest argv) (declare (ignorable argv)) (let* ((n (read)) (m 0)) (loop for i from 1 to n do (let ((l (+ i (* (- n i) (1+ i))))) (when (> l m) (setq m l))) finally (format t "~D~%" m)))) (main)