The sum#2307

The sum

1 second
128 megabytes
Easy

A sequence of integers is given. You must answer range-sum queries on this array.

Input

The first line contains two integers and (1 \le n \le 10^5,\ 0 \le k \le 10^5) — the number of elements in the array and the number of queries.

Each of the following lines contains one query of the following types:

  • A~l~r~x — assign the value to every element with indices from to r~(1 \le l \le r \le n, 0 \le x \le 10^9);

  • — find the sum of array elements with indices from to r~(1 \le l \le r \le n).

Initially, the array is filled with zeros.

Output

For each query of the form , print the sum of numbers on the corresponding segment.

Examples

Example 1

Loading
Loading