You are given 106 boxes that are numbered from 1 to 106. The value of each box is equal to its number.
There are N ranges and every range consists of two integers L and R denoting that the value of box in the range [L,R] will turn out to be zero.
Find the sum of values of all boxes from 1 to 106 .
Note: The ranges may overlap.
Input format
Output format
Print a single integer denoting the answer.
Constraints
0≤N≤105
1≤L≤R≤106
Boxes having number 1, 22, 2001, 999999,1000000 does not belong to any range.
So the sum of these numbers is 2002023 which is our answer.