How many ways I can choose a $N$ element sequence such their cumulative is $S$? Is there any formula for it? Values of $N$ will be greater Than $0$.
Here are few examples
Let $ N=4$ and $S=5$. Their are are $4$ possibilities
$\{(1,1,1,2), \\ (1,1,2,1), \\ (1,2,1,1), \\ (2,1,1,1)\}$
So Possible Sequence is equal to $4$.
Again, let $N=3$ and $S=6$
$\{(1,1,4), \\ (1,2,3),\\ (1,3,2),\\ (1,4,1),\\ (2,1,3),\\ (2,2,2),\\ (2,3,1),\\ (3,1,2),\\ (3,2,1),\\ (4,1,1)\}$
So Possible Sequence is equal to $10$.
The formula is $\binom{S-1}{N-1}$. This number is a part of what is known as the composition of a number (what is the sum of these numbers over N).
If you want more information you can see the topic more in-depth here.