(let* ((lst (loop :repeat 5 :collect (read)))
       (lst-a (mapcar (lambda (k) (if (= 10 (- 10 (mod k 10)))
                                      0
                                      (- 10 (mod k 10)))) lst)))
  (format t "~A~%~A~%" lst lst-a)
  (princ (- (+ (reduce #'+ lst) (reduce #'+ lst-a)) (reduce #'max lst-a))))