Layout of the city
At Petya on the table is a layout of the city center. Layout of buildings is an N in the form of rectangular parallelepipeds, located on a flat surface. The buildings are very close touch the walls.
Peter wants to paste over the top and side faces of all buildings with colored paper. He decided to pre-calculate how much paper it would need, given that the adjoining parts of the walls can not hang.
Required to write a program that takes as input the information about the layout (for each building is known for its height and position the base) and displays the desired area of the paper.
Input
The input file contains an integer N (1 ≤ N ≤ 10^5) — the number of buildings.
This is followed by N quintuples of integers: x_i y_i u_i v_i h_{i (}0 ≤ x_i < u_i ≤ 10000, 0 ≤ y_i < v_i ≤ 10000, 0 < h_i ≤ 100_{)}, where (x_i, y_i) and (u_i, v_i) — the coordinates of the two opposite corners of the base of the building in centimeters, h_i — building height in centimeters.
Foundations of buildings are rectangles with sides parallel to coordinate axes. The sum of the upper and side faces of all buildings, excluding contiguous units does not exceed 10^9.
Output
The output file should contain an integer S - the required area in square centimeters.