#!/usr/bin/env gosh (define (how-meny l ws) (let loop ([i 1][sum (car ws)][wr (cdr ws)]) (if (> sum l) (- i 1) (if (null? wr) i (loop (+ i 1) (+ sum (car wr)) (cdr wr)))) ) ) (define (main _) (let* ([l (read)]) (read)(read-char) (let ([ws (sort (map (^x (string->number x)) (string-split (read-line) " ")))]) (display (how-meny l ws)) )) (newline) 0)