Alice went shopping with her Dad to a magical shop.
She wants to buy some golden snitches from the shop. All the snitches in the shop are kept on a rack in straight line, one kept aside the other.
Shop being magical, doesn't let anyone pick snitch from any arbitrary position. If someone want to buy more than one snitch one can only pick contiguous segment of the items. And the cost of the segment is determined by the cost of each item in it. Alternatively Cost of segment from position l
to r
(inclusive) is.
where C1,C2,C3,......,Cn are the cost of each item from 1
to n
.
Alice's Dad has exactly k
Rupees(Currency in India) and he wants to spend it all on Alice. Help Alice find the number of segments which she can afford to buy with k
Rupees.
Note : Word "item" and "snitch" are used interchangeably in the above statements.
Input format
n
and k
denoting number of snitches in shop and the amount of money Alice's Dad has.n
space separated integers C1, C2, ..... Cn
denoting cost of each snitch present in the shop.Output format
Constraints
Segments which Alice can Choose :
5*0 = 0
.5*0 + 5*0 = 0
.0*1 = 0
.0*5 = 0
.0*5 + 0*1 = 0
.5*0 = 0
.0*1 = 0
.