(defparameter n (read))
(defparameter x (read))
(defparameter a (loop repeat n
                      collect (read)))
(defun f (x a c)
  (if (or (null a) (< x (car a)))
      c
      (f (- x (car a)) (cdr a) (1+ c))))
(sort a #'<)
(f x a 0)