C. Boredom
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Alex doesn't like boredom. That's why whenever he gets bored, he comes up with games. One long winter evening he came up with a game and decided to play it.
Given a sequence a consisting of