Bessie and Elsie are playing a game with N (1≤N≤105) piles of stones, where the i-th pile has a_i stones for each 1≤i≤N (1≤a_i≤106). The two cows alternate turns, with Bessie going first.
The first cow who is unable to remove stones on her turn loses.
Compute the number of ways Bessie can remove stones on her first turn in order to guarantee a win (meaning that there exists a strategy such that Bessie wins regardless of what choices Elsie makes). Two ways of removing stones are considered to be different if they remove a different number of stones or they remove stones from different piles.
The first line contains N.
The second line contains N space-separated integers a_1,…,a_N.
Print the number of ways Bessie can remove stones on her first turn in order to guarantee a win.
Note that the large size of integers involved in this problem may require the use of 64-bit integer data types (e.g., a "long long" in C/C++).