Smriti is happy that you solved first question. So, she created a new problem for you to solve. Given a deck of cards, you have to form sub-deck of cards(maintaing original order). Sub-deck in the form that the sum of the numbers on the cards should be equal to or greater than to the sum of the adjacent right sub-Deck. Find the total number of possibilities of forming such decks.
First line consists of T test cases. Only line of test cases consists of string, string consisting only of numeric digits.
Single line output, print the required output.
1st test case:  ; no right sub-deck with the greater sum can formed.
2nd test case: , [5-7] ; right sub-deck has the sum 7 which is greater that left sub-deck 5.
3rd test case:, [1-117], [11-17], [111-7], [1-1-17], [1-11-7], [1-1-1-7]
[1-11-7]: right sub-deck with sum 7 is greater than the left sub-deck 11, which gives the sum 2, which is also greater than it's left sub-deck i.e. 1.