- Time limit: 1.00 s
- Memory limit: 512 MB
Your task is to maintain an array of values and efficiently process the following types of queries:
- Increase the first value in range by , the second value by , the third value by , and so on.
- Calculate the sum of values in range .
Input
The first input line has two integers and : the size of the array and the number of queries.
The next line has values : the initial contents of the array.
Finally, there are lines describing the queries. The format of each line is either "1 " or "2 ".
Output
Print the answer to each sum query.
Constraints
Example
Input:
5 3 4 2 3 1 7 2 1 5 1 1 5 2 1 5
Output:
17 32