#abc130d. [abc130_d]Enough Array

[abc130_d]Enough Array

Problem Statement

You are given a sequence of positive integers of length NN, A=a1,a2,,aNA=a_1,a_2,…,a_{N}, and an integer KK. How many contiguous subsequences of AA satisfy the following condition?

  • (Condition) The sum of the elements in the contiguous subsequence is at least KK.

We consider two contiguous subsequences different if they derive from different positions in AA, even if they are the same in content.

Note that the answer may not fit into a 3232-bit integer type.

Constraints

  • 1leqaileq1051 \\leq a_i \\leq 10^5
  • 1leqNleq1051 \\leq N \\leq 10^5
  • 1leqKleq10101 \\leq K \\leq 10^{10}

Input

Input is given from Standard Input in the following format:

NN KK a1a_1 a2a_2 ...... aNa_N

Output

Print the number of contiguous subsequences of AA that satisfy the condition.


Sample Input 1

4 10
6 1 2 7

Sample Output 1

2

The following two contiguous subsequences satisfy the condition:

  • A\[1..4\]=a_1,a_2,a_3,a_4, with the sum of 1616
  • A\[2..4\]=a_2,a_3,a_4, with the sum of 1010

Sample Input 2

3 5
3 3 3

Sample Output 2

3

Note again that we consider two contiguous subsequences different if they derive from different positions, even if they are the same in content.


Sample Input 3

10 53462
103 35322 232 342 21099 90000 18843 9010 35221 19352

Sample Output 3

36