Workers spread n rectangular tarps over a flat field. Tarp i is an axis-aligned rectangle covering all points with x1 <= x <= x2 and y1 <= y <= y2 (with x1 < x2 and y1 < y2). Tarps may overlap. Compute the total area of the field covered by at least one tarp (the area of the union). Overlapping area is counted once.
Input format
Line 1: an integer n.
Next n lines: four integers x1 y1 x2 y2 describing one rectangle.
Output format
A single integer: the area of the union of all rectangles.
Constraints
- 1 ≤ n ≤ 2000
- 0 ≤ x1 < x2 ≤ 1000000000
- 0 ≤ y1 < y2 ≤ 1000000000