Count them!#5870

Count them!

2 seconds
256 megabytes
Very easy

"What a good religion the Hindus invented" V.S. Vysotsky

We are all familiar with the good old game of Nim. In this game, there are several heaps of stones. Players take turns. On each turn, a player can take any number of stones from any one heap. The player who cannot make a move loses.

Buddhists Laozi and Confucius are playing this game. They do not care who will win, as victory is just a sign of vanity. What is much more interesting is how many winning moves the first player can make. However, Laozi and Confucius do not want to count these moves themselves, so they ask you to find this number.

Input

The first line contains a single natural number (1 \le N \le 10^5), which is the number of heaps. The second line contains the sizes of the heaps, separated by spaces. The size of each heap does not exceed 10^9.

Output

Output the number of winning moves the first player has.

Examples

Example 1

Loading
Loading