A special feature of the Idua High School Sports Festival is the rotating mass game. In this game, the students rotate and turn their bodies in response to the teacher's command. The students move in unison, which is very cool.
The $N$ students participating in the mass game are numbered from 1 to $N$. At the beginning, the $N$ students are lined up in a row from east to west in order of number from 1 to $N$, and all students stand facing north. The teacher instructs the students how many turns to make. The teacher shouts out three numbers, a, b, and c, and the students from a to b turn their bodies in unison according to the value of c. c is an integer, and if it is positive, the student turns left, and if it is negative, the student turns right, and he/she turns a quarter of a turn for every 1 of the number. For example, if the number is 1, the student turns a quarter turn to the left, if the number is -2, the student turns half a turn to the right, if the number is 4, the student turns one turn to the left, and if the number is -6, the student turns one and a half turns to the right.
The teacher in charge of issuing the instruction received a query from the principal who wanted to know the number of students facing north minus the number of students facing south in a specified range of numbers immediately after the instruction at several points in time. I have the notes of the history of the order at hand, so I should be able to write a program to determine the number of students I want to know at any point in time.
Given the teacher's order and the information about the inquiries from the principal, create a program to find the number of students facing north minus the number of students facing south for each inquiry.
Input is given in the following format.
$N$ $M$ $info_1$ $info_2$ : $info_M$
In the first line, the number of students who participated in the mass game $N$ ($1 \leq N \leq 300,000$) and the number of information about the order and query $M$ ($1 \leq M \leq 100,000$) are given. In the following $M$ line, the information $info_i$ about the order and query is given. The information is arranged in chronological order. Each $info_i$ is given in one of the following formats.
1 $a$ $b$ $c$
or
2 $d$ $e$
1 $a$ $b$ $c$ denotes the order that the students from the $a$th to the $b$th should rotate according to the number $c$. However, $1 \leq a \leq b \leq N$ and $-1,000 \leq c \leq 1000$. 2 $d$ $e$ denotes the query of how many students from the $d$th to the $e$th are facing north minus the number of students facing south immediately after the preceding issue. However, $1 \leq d \leq e \leq N$.
One or more pieces of information about the query will be given.
For each query, output the number of students facing north minus the number of students facing south on a single line.
5 5 2 1 5 1 1 2 2 2 1 5 1 2 5 -1 2 1 5
5 1 -1