Problem: Sasha likes programming. Once, during a very long contest, Sasha decided that he was a bit tired and needed to relax. So he did. But since Sasha isn't an ordinary guy, he prefers to relax unusually. During leisure time Sasha likes to upsolve unsolved problems because upsolving is very useful.
Therefore, Sasha decided to upsolve the following problem:
You have an array with integers. You need to count the number of funny pairs . To check if a pair is a funny pair, take , then if is an even number and , then the pair is funny. In other words, of elements of the left half of the subarray from to should be equal to of elements of the right half. Note that denotes the bitwise XOR operation.
It is time to continue solving the contest, so Sasha asked you to solve this task.
Input Format: The first line contains one integer () — the size of the array.
The second line contains integers () — array itself.
Output Format: Print one integer — the number of funny pairs. You should consider only pairs where is even number.
Note: Be as cool as Sasha, upsolve problems!
In the first example, the only funny pair is , as .
In the second example, funny pairs are , , and .
In the third example, there are no funny pairs.