After all the lectures, lecturers decided to go taste some cookies. Khust's lecturers love to eat cookies, especially when they want to relax.
There are cookies in a row. Each cookie is one of kinds. Lecturers will take only consecutive cookies of the same kind. After every lecturer got his cookie, those cookies disappear from the row. They will eat cookies until there's at least one way to choose consecutive cookies of the same kind.
Count the number of cookies that one of the lecturers will eat.
Input Specification
First line contains two integers and --- the number of cookies and the number of lecturers.
The second line contains integers --- kind of the -th cookie.
Output Specification
Print one number --- the number of cookies that one of the lecturers will eat.
Sample Input 1
Copy
10 3
1 1 2 3 3 3 2 2 1 1
Sample Output 1
Copy
3
Note
Initially, there are cookies and lecturers.
Each of the lecturers will take cookies of the third type, and then there will be cookies left.
After another step, there will be cookies left.
And in the end, there is only one cookie.
So, each lecturer ate cookies.
Comments