(defconstant +mod107+ 1000007) (defun main (&rest argv) (declare (ignorable argv)) (let* ((n (read)) (a (floor n 2)) (b (1+ a)) (res 0)) (setq res (max res (- (+ n (* n a)) (* a a)))) (setq res (max res (- (+ n (* n b)) (* b b)))) (format t "~d~%" (mod res +mod107+)))) (main)