5

아직 제출이 없습니다시간 제한5초메모리 제한555 MB

문제

You are given an array aa of length nn consisting of non-negative integers. Calculate the number of pairs (k,T)(k, T) such that there exists a subsequence of aa of length kk whose sum is equal to TT.

Just kidding, this is too general. Suppose the sum of elements of aa is equal to SS, then it is guaranteed that aa has at least S/5S/5 elements equal to 11.

입력

The first line contains two positive integers nn and SS (1n,S21051 \le n, S \le 2 \cdot 10^5) --- the number of elements in aa and their sum.

The second line contains the array a_1,a_2,,a_na\_1, a\_2, \ldots, a\_n (0a_iS0 \le a\_i \le S). It is guaranteed that _i=1na_i=S\sum\_{i=1}^{n} a\_i = S and at least S/5S/5 elements of aa are equal to 11.

출력

Print the number of pairs (k,T)(k, T) such that there exists a subsequence of aa of length kk whose sum is equal to TT.