The sum#776

The sum

1 second
128 megabytes
Very hard (≈2050)

The array of elements is given. Find the sum of numbers on a segment.

Input

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

  • A~l~r~x — assign the value of to each element form position to r~(1 \le l \le r \le n, 0 \le x \le 10^9)

  • — find the sum of array elements on positions from to r~(1 \le l \le r \le n)

Initially the array is filled with zeroes.

Output

For each query of the form "" print the sum of numbers on a segment.

Examples

Example 1

Loading
Loading