Given an array of integers A and a number B
A subarray of an array is said to be good if it fulfills any one of the criteria:

Length of the subarray must be even and the sum of all the elements of the subarray must be less than B.

Length of the subarray must be odd and the sum of all the elements of the subarray must be greater than B.
Your task is to find the count of good subarrays in A. If the count of good subarrays exceeds 10^9 then return 10^9.
Eg:
Input 1:
A = [1, 2, 3, 4, 5]
B = 4
Output 1:
6
Explanation 1:
Even length good subarrays = {1, 2}
Odd length good subarrays = {1, 2, 3}, {1, 2, 3, 4, 5}, {2, 3, 4}, {3, 4, 5}, {5}