문제
Bessie and Elsie are playing a game with
First, Bessie chooses some positive integer
Then Elsie chooses some positive integer
Then Bessie chooses some positive integer
stones and so on.
In general,
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
The second line contains
출력
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++).
예제1
1
7
4
Bessie wins if she removes
stones from the only pile. Then the game terminates immediately.
예제2
6
3 2 3 2 3 1
8
Bessie wins if she removes