(let ((n (read)) (z 0)) (let loop((foo 3)) (if (> foo n) (begin (display z) (newline)) (begin (when (= (modulo foo 3) 0) (set! z (+ z 2))) (when (= (modulo foo 5) 0) (set! z (+ z 2))) (loop (+ foo 1)) ) ) ) )