Lamps
Now it's Ayhan's and Raul's turn to play with light bulbs. Raul has arranged light bulbs in a row, numbered from to . 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 . 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 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 and . The next line contains a string consisting of characters and . means that the -th bulb is initially turned off, and means that it is turned on.
Each of the next lines contains three integers and .
If , Raul turns off all the bulbs that are turned on in the interval . If , 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 subtasks. Points for each subtask are awarded only if all tests related to this subtask are passed successfully.
( points): ;
( points): ;
( points): ;
( points): ;
( points): no additional restrictions;