Zeros and Ones#8379

Zeros and Ones

1 second
512 megabytes
Medium (≈1350)

Hedgehog Alina discovered an intriguing array of zeros while going through her old notebooks. She realized she could perform several fascinating operations on this array:

Input

The first line contains two natural numbers N \leq 10^5 and M \leq 2 \cdot 10^5, representing the size of the array and the number of operations, respectively. The following lines describe the operations.

Output

For each operation of type , output the number of ones in the sub-segment from to .

Examples

Example 1

Loading
Loading