You are given an array a of length n consisting of non-negative integers. Calculate the number of pairs (k,T) such that there exists a subsequence of a of length k whose sum is equal to T.
Just kidding, this is too general. Suppose the sum of elements of a is equal to S, then it is guaranteed that a has at least S/5 elements equal to 1.
The first line contains two positive integers n and S (1≤n,S≤2⋅105) --- the number of elements in a and their sum.
The second line contains the array a_1,a_2,…,a_n (0≤a_i≤S). It is guaranteed that ∑_i=1na_i=S and at least S/5 elements of a are equal to 1.
Print the number of pairs (k,T) such that there exists a subsequence of a of length k whose sum is equal to T.