#abc181b. [abc181_b]Trapezoid Sum
[abc181_b]Trapezoid Sum
Problem Statement
We have a blackboard with nothing written on it. Takahashi will do operations to write integers on it.
In the -th operation, he will write each integer from through once, for a total of integers.
Find the sum of the integers written on the blackboard after the operations.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the sum of the integers written on the blackboard after the operations.
Sample Input 1
2
1 3
3 5
Sample Output 1
18
In the -st operation, he will write , , and on the blackboard.
In the -nd operation, he will write , , and on the blackboard.
The sum of the integers written is .
Sample Input 2
3
11 13
17 47
359 44683
Sample Output 2
998244353
Sample Input 3
1
1 1000000
Sample Output 3
500000500000