eolymp
bolt
Try our new interface for solving problems

Steps

Sasha and Vasya began to engage in tap dancing. The dance consists of stomps with feet on the floor. But as they learn very quickly, they decided to experiment with choreography.

The choreography of tap dance is described with a sequence of two letters L and R. L means stomping with left foot, and R means stomping with right foot correspondingly. Sasha realized that the best part of this dance is the one that does not use the same foot in succession. He identified the importance of choreography as the largest contiguous sequence with no two consecutive characters.

As you know, the creation of a beautiful dance is a very complicated process, with many small changes before the best option is found. Therefore, Bob wants to know the value of the choreography after each change. The change is a replacing of L to R (or vice versa) at some position.

Before all changes the sequence consists of letters L only.

Input

The first line contains two integers: the length of choreography n (1n200000) and number of changes q (1q200000). Each of the next q lines contains one number giving the replacing position.

Output

Print q integers, one per line: the value of choreography after each change.

Time limit 1 second
Memory limit 122.28 MiB
Input example #1
6 2
2
4
Output example #1
3
5
Input example #2
6 5
4
1
1
2
6
Output example #2
3
3
3
5
6