 (defun read-n-num (n)
           (let ((result)) (dotimes (x n (nreverse result)) (push (read) result))))
(let* ((v-n (read))
                (v-ai (read-n-num v-n))
                (need-hight (first v-ai)))
           (reduce #'+ (reduce
            (lambda (result v-a)
              (when (< need-hight v-a)
                (setf need-hight v-a))
              (cons (- need-hight v-a) result))
            v-ai :initial-value nil))
          )