SP10596 MON2012 - Monkey and apples

Description

Monkey Chris loves apples. That's why he has planted lots of apple trees. He does two types of operations on this trees. - First operation `1 x y`: means counting ripe apple trees on interval $[x+c, y+c]$. - Second operation `2 x y`: means that all apples on interval $[x+c, y+c]$ get ripe(edible). C=0 in the beginning and becomes the answer of each query ("1" operation).

Input Format

Input begins with M ($1\le M \le 10^5$) the number of operations. Afterwards M lines each of them is an operation (`1` or `2`). $1\le X+C; Y+C\le 10^9$.

Output Format

N/A