(let* ((l (string->number (read-line))) (n (string->number (read-line))) (w (sort! (map string->number (string-split (read-line) " "))))) (letrec ((count (lambda (w l) (cond ((null? w) 0) ((<= (car w) l) (+ 1 (count (cdr w) (- l (car w))))) (else 0))))) (print (count w l))))