1

Clojure, 50 bytes
#((reduce(fn[[s n]i][(+(max(- i n)0)s)i])[0 0]%)0)
Try it online! (Why doesn't this print anything?)
#( ; begin anonymous function
(reduce
(fn [[s n] i] ; internal anonymous reducing function, destructures accumulator argument into a sum and the previous item
...