(defconstant +mod107+ 1000000007) (defun main (&rest argv) (declare (ignorable argv)) (let* ((n (read)) (a (make-array 100 :element-type 'integer))) (dotimes (i n) (setf (aref a i) (read))) (dotimes (i (1- n)) (dotimes (j (- n 1 i)) (setf (aref a j) (mod (+ (aref a j) (aref a (1+ j))) +mod107+)))) (format t "~d~%" (aref a 0)))) (main)