The new year has come and just like all the competitive programmers, our hero Stefan received an array with positive integers as a Christmas present as well! Now he wants to explore the array and to find new interesting properties as he always likes doing.
Task
For this year, he wants to find out the maximum number of values we can take from the array such that both the bitwise AND and the bitwise XOR are different from .
Since this is too easy for him, he also modifies his array and wants you to answer to the same question after each update.
Input data
The input contains , the number of integers from the array and , the number of queries.
The next line contains integers, representing the numbers from Stefan's array.
The next lines contain the queries. Each query is represented by two integers, and , representing that on the position , we will change its value to .
Output data
The output will contain lines. On the first line you will print the answer before any updates, and on the next lines you will print the answer after each update.
Constraints and clarifications
- For tests worth points, .
- For tests worth more points, .
- For tests worth more points, .
Example 1
stdin
5 8
3 2 4 1 5
1 1
2 3
3 3
4 2
3 6
4 5
5 2
1 6
stdout
3
3
4
5
4
3
4
3
4