Fito is collecting some pumpkins that are lying on a line.
For each pumpkin, he knows his weight. Believe it or not, small pumpkins can be heavier than bigger ones. He has a truck that he will use as transportation but it cannot carry more than a given weight in total. Moreover, he can only collect a consecutive interval of pumpkins because otherwise, he might destroy some of the remaining ones.
Given some queries with the maximum weight the truck can carry, your task is to help Fito finding out how many ways he has for choosing the pumpkins he will pick up.