The Sea is not for Fish

In an archipelago, in the middle of the Pacific Ocean, the economy is governed by fishing, as fish is the main food available. Lately, the population of this archipelago has increased dramatically, which has led to a large increase in fishing, and consequently to problems.

In this archipelago, every fisher goes to the high seas every day to bring as many fish as possible to his village. With the expansion of fishing, fishers are starting to throw their fishing nets over other fishermen's. As a result, fishers lose out as only the first fisherman catches the fish from the intersection between the nets.

The Island Fishermen's Association decided to survey to find out how much of the sea is actually being used, i.e. which area of the sea is covered by at least one fishing net.

As there are many intersections between the fishing nets, it is tough for the association to calculate the total area of the region covered by the nets. For this reason, they have asked you to write a programme to solve this problem.

As it is tough to navigate through the sea, fishers always throw their nets so that the regions covered by each net are always rectangles with sides parallel to the axes, if we imagine the sea as a Cartesian plane.

Input

The first line has an integer NN indicating the number of nets that have been launched. The next NN lines describe the regions covered by the nets: each contains four integers XiX_i and XfX_f, YiY_i and YfY_f. The region covered by the net in question contains every point (X,YX, Y) such that XiXXfX_i \leq X \leq X_f and YiYfY_i \leq Y_f.

Output

The out must contain only one line containing the area of the sea region actually used by fishermen, i.e. the total area of the sea region covered by at least one fishing net.

Constraints

  • 1N1001 \leq N \leq 100
  • 1XiXf1001 \leq X_i \leq X_f \leq 100
  • 1YiYf1001 \leq Y_i \leq Y_f \leq 100
Input Samples Output Samples
2
1 3 1 3
2 4 2 4
7
3
1 6 1 2
3 7 1 2
2 5 1 2
6
Translated by Luis Paulo