Combined rectangles#2926

Combined rectangles

1 second
128 megabytes
Very easy

Combining rectangles is much easier when their sides are parallel to the coordinate axes. Find the area covered by the union of a given set of such rectangles.

prb2926.gif

Input

The first line contains the number of rectangles (2 \leq n \leq 3). Each of the next lines contains the coordinates of two opposite corners of a rectangle in the format: x_1\ y_1\ x_2\ y_2. The coordinates are separated by spaces and are integers in the range [-10^9, 10^9].

Degenerate rectangles are allowed.

Output

Print the area of the union of the rectangles, rounded to the nearest integer.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading

Example 3

Loading
Loading

Example 4

Loading
Loading