(defun main () (let* ((n (read)) (m (read)) (a (make-array n))) ;; 入力を読み込む (dotimes (i n) (setf (aref a i) (read))) (let ((i 0)) (loop while (< i n) do (when (oddp (aref a i)) (let ((ans (aref a i)) (ct 1) (j (1+ i))) (loop while (and (< j n) (oddp (aref a j))) do (progn (incf ct) (incf ans (aref a j)) (incf j))) (when (>= ct m) (format t "~a~%" ans)) (setf i j))) (incf i))))) ;; Call the main function (main)