Problem Statement

Given an integer array A and two integers B and C.

You need to find the number of subarrays in which the number of occurrences of B is equal to number of occurrences of C.

NOTE: Don't count empty subarrays.

Problem Constraints

1 <= |A| <= 104

1 <= A[i], B, C <= 108

B != C

Input Format

First argument is an integer array A.

Second argument is an integer B.

Third argument is an integer C.

Output Format

Return an integer denoting the number of subarrays in which the number of occurrences of B is equal to number of occurrences of C.

Example Input

Input 1:

 A = [1, 2, 1]
 B = 1
 C = 2

Input 2:

 A = {1, 2, 1}
 B = 4
 C = 6

Example Output