400781: GYM100247 C Victor's Research
Description
Unacknowledged scientist Victor conducts a pseudoscientific research of the relation between integers that cross his mind and the integer that comes into his assistant's mind. He wrote the integers a1, ..., an which had crossed his mind. Then it turned up that the integer s had come into his assistant's mind. Victor wants to determine how many consecutive non-empty sets of integers al, al + 1, ..., ar (l ≤ r) have the sum al + al + 1 + ... + ar = s.
InputThe first line contains two integers separated by space: n and s (1 ≤ n ≤ 200000, - 2·1014 ≤ s ≤ 2·1014) — the number of integers which crossed Victor's mind and the integer that came into his assistant's mind.
The second line contains n integers separated by space: ai ( - 109 ≤ ai ≤ 109) — the integers which crossed Victor's mind.
OutputOutput the only integer — the number of consecutive non-empty sets of integers which have the sum s.
ExamplesInput5 2Output
-1 1 2 -1 1
5Input
6 3Output
3 -2 1 -1 1 2
3