Given an array A of n integers. Count the number of contiguous subsequences such that all values in the subsequence appear an odd number of times.
- The first line contains two integers n.
- The second line contains n integers Ai.
Output
- Print an integer, the number of subsequences that satisfy the condition.
Constraints
Example
Input:
3
1 2 2
Output:
4