(define (solve l w) (let loop ((ls w) (cnt 0) (sum 0)) (if (or (null? ls) (< l (+ (car ls) sum))) cnt (loop (cdr ls) (+ cnt 1) (+ sum (car ls)))))) (define (MAIN) (let ((l (string->number (read-line))) (n (string->number (read-line))) (w (sort (map string->number (string-split (read-line) " "))))) (print (solve l w)))) (MAIN)