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.
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 a single number: the total perimeter of the green plantings.
Example 1