Green plantings#198

Green plantings

1 second
64 megabytes
Medium

Knowing the coordinates of the opposite corners of several planned forest planting areas, each shaped as a rectangle with sides parallel to the coordinate axes, calculate the total perimeter of these green plantings.

Input

The first line contains the number of planted areas, (1 \leq N \leq 100). Each of the following lines contains integers, separated by spaces, representing the coordinates of the opposite corners of each rectangular area.

X_1, Y_1, X_2, Y_2 (|X_1|, |Y_1|, |X_2|, |Y_2| \leq 2000)

Output

Output a single number: the total perimeter of the green plantings.

Examples

Example 1

Loading
Loading