프로그램 명: coci_ivana
제한시간: 1 초

Even though she saw Zvonko steal Mirko's microprocessor in the second task, Mirko's sister Ivana did not tell Mirko because she likes Zvonko. She suggested to him that they go see a movie together so that she would "forget" about the incident.

Zvonko does not care much for girls because they take away precious time he usually spends practicing his math-fu. He suggested that the two of them play a game and, if Ivana wins, they will go see a movie together. Ivana agreed, being good at jump rope and she sometimes even kicks a football around with her two brothers.

Zvonko laid N positive integers in a circle on the floor and explained the rules:

Zvonko plays optimally; he always looks for a strategy that leads to certain victory or a draw. Zvonko does not know how well Ivana plays. Being a true cavalier, he let Ivana have the first move. But Ivana only cares about sitting next to Zvonko in front of the big screen so she seeks help playing.

Write a program that finds how many different first moves Ivana can make, so that she has a chance of winning afterwards.

입력

출력

Output the desired number on a single line.

입출력 예

input 

3 
3 1 5 

output 

3 

input 

4 
1 2 3 4 

output 

2

input 

8 
4 10 5 2 9 8 1 7 

output 

5
출처:coci/2006-2007/contest5 5

[질/답] [제출 현황] [푼 후(0)]
[ 채 점 ] [홈으로]  [뒤 로]