(defun main (&rest argv) (declare (ignorable argv)) (let* ((h (read)) (n (1- (read))) (hs (sort (loop repeat n collect (read)) #'>)) (ans 1)) (loop for i below n while (< h (elt hs i)) do (incf ans) finally (princ ans)) (case (mod ans 10) (1 (princ "st")) (2 (princ "nd")) (3 (princ "rd")) (t (princ "th"))) (terpri))) (main)