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