Time Limit : sec, Memory Limit : KB
English / Japanese  

Cat Hole

In your neighborhood, there is a side hole where many cats go in and out. It's a dead-end and you can't go through it, but it's deep enough to fit all the cats in the neighborhood. The hole is just wide enough for a cat to fit in, so a cat that enters first cannot be pushed out of the way by a cat that enters later. Also, the cat that enters first can't push the cat that enters later out of the way.

As a cat lover, you recorded the cats that went in and out of the side hole in order. When you started recording, there was not a single cat in the hole, but eventually, cats started entering and exiting the hole. Sometimes the same cat would come and go several times.

After you finished recording, you decided to write a program to check if you had recorded correctly.

You are given a list of cats that have entered and exited the horizontal hole. Create a program to find the first position that can be determined as an error without looking further back in the list, starting from the top. However, assume that there are 100 cats and that they are numbered from 1 to 100.

Input

The input is given in the following form.

$L$
$c_1$ $c_2$ ... $c_L$

The first line gives the length $L$ ($1 \leq L \leq 1000$) of the list of cats that have entered and exited the cave. The next line gives the information $c_i$ ($-100 \leq c_i \leq 100$, $c_i \ne 0$) of the $i$-th cat that entered and exited the hole. Note that if the number of the $i$-th cat entering and exiting is $a$, then $c_i = a$ when the cat enters the hole, and $c_ i = -a$ when the cat exits the hole.

Output

When looking at the list in order from the top, output the first position that can be determined to be an error without looking further back, in a line. If there is no error, output "OK" in a line.

Sample Input and Output

Sample Input 1

4
1 2 -3 -1

Sample Output 1

3

Sample Input 2

6
2 1 2 -2 -1 -2

Sample Output 2

3

Sample Input 3

5
2 1 -1 3 -3

Sample Output 3

OK