# Lamps

Now it's Ayhan's and Raul's turn to play with light bulbs. Raul has arranged $n$ light bulbs in a row, numbered from $1$ to $n$. Initially, some of these bulbs are lit, and some are turned off. A segment of consecutive light bulbs is considered beautiful if all the bulbs in this segment are turned on. As we know, the number of all possible segments of the bulb equals $nâ‹…(n+1)/2$. Some of them may be beautiful initially.

Raul first asks Ayhan how many beautiful segments are in the sequence of light bulbs in the original state. Then, to annoy Ayhan, he either turns off or turns on all the bulbs in a specific range $q$ times, and each time he asks Ayhan how many segments became beautiful up to the current moment. Ayhan is tired of answering Raul's endless questions. Help him with this task.

## Input

The first line contains two integers $n$ and $qÂ(1â‰¤n,qâ‰¤3â‹…10_{5})$. The next line contains a string $s$ consisting of $n$ characters $0$ and $1$. $s_{i}=0$ means that the $i$-th bulb is initially turned off, and $s_{i}=1$ means that it is turned on.

Each of the next $q$ lines contains three integers $l_{i},r_{i}Â(1â‰¤l_{i}â‰¤r_{i}â‰¤n,1â‰¤iâ‰¤q)$ and $c_{i}Â(0â‰¤c_{i}â‰¤1,1â‰¤iâ‰¤q)$.

If $c_{i}=0$, Raul turns off all the bulbs that are turned on in the interval $[l_{i},r_{i}]$. If $c_{i}=1$, then he turns on all the bulbs that are turned off in this interval.

## Output

In the first line, print the number of segments that were initially beautiful, and in the following lines, print the number of segments that became beautiful up to the current moment after performing the corresponding query.

## Examples

## Scoring

This problem consists of $5$ subtasks. Points for each subtask are awarded only if all tests related to this subtask are passed successfully.

($17$ points): $nâ‰¤50,qâ‰¤150$;

($19$ points): $nâ‰¤500,qâ‰¤250$;

($12$ points): $nâ‰¤5000,qâ‰¤1000$;

($20$ points): $nâ‰¤50000,qâ‰¤1000$;

($32$ points): no additional restrictions;