450. Nice subarray

0

Medium

Given an array of integers A and an integer k, count the total number of subarrays in A whose sum is equal to k. These subarrays are referred to as 'Nice' subarrays.

Input Format

The first line of input contains two space-separated integers N (the size of the array) and K (the target sum).
The second line consists of N space-separated integers, representing the elements of array A.

Output Format

Print the total number of Nice subarrays in array A.

Example

Input

5 4
1 3 2 4 5

Output

2

Constraints

1 <= N <= 10^5
-10^4 <= Arr[i] <= 10^4
-10^4 <= k <= 10^4

Loading...

View Submissions

Console