Bowling is played with the following rules: on a straight line, there is a row of pins, with a distance of between any two adjacent pins. Players take turns. In one move, a player can knock down either one pin, or two pins that are exactly apart. Missing a pin is not allowed. The player who knocks down the last pin wins.
In our case, things are a bit more complicated. Vovan and Petian, two businessmen, have rented an entire bowling alley, so they have independent bowling lanes at their disposal. On their turn, a player chooses which lane to make a move on, and makes the move. The next player may choose the same or a different lane for their move. The win condition remains the same: knock down the last pin.
Vovan moves first, and he is interested in finding out how many different winning moves he has. Two moves are considered different if at least one pin knocked down in the first move is not knocked down in the second move or vice versa.
\InputFileThe first line contains the number of lanes (n \leq 1000). The second line contains natural numbers k_i (k_i \leq 1000) --- the number of pins on lane number .
\OutputFileOutput the number of winning moves available to Vovan.
Example 1
Example 2