You are given a integer sequence c of length n, ci denotes the ith color in the sequence c.
We define a color sequence is legal only if it merely contains colors that appear even number of times.
For example, sequence {0,1,0,1} is legal because both color 1 and 0 appear 2 times, and 2 is an even number. And sequence {0,1,0} is illegal because color 1 only appear 1 time, and 1 is not an even number.
Now, you need to figure out how many consecutive subsequence of c that is a legal color sequence.The first line contains one integern(1≤n≤106), the length of the sequence c.
The second line contains n integer, the ith integer denotes the ith color, ci(0≤ci≤20).
Print one integer as the answer.