Vanya has a table consisting of 100 rows, each row contains 100 cells. The rows are numbered by integers from 1 to 100 from bottom to top, the columns are numbered from 1 to 100 from left to right. 

In this table, Vanya chose *n* rectangles with sides that go along borders of squares (some rectangles probably occur multiple times). After that for each cell of the table he counted the number of rectangles it belongs to and wrote this number into it. Now he wants to find the sum of values in all cells of the table and as the table is too large, he asks you to help him find the result.
The first line contains integer *n* (1 ≤ *n* ≤ 100) — the number of rectangles.

Each of the following *n* lines contains four integers *x*<sub class="lower-index">1</sub>, *y*<sub class="lower-index">1</sub>, *x*<sub class="lower-index">2</sub>, *y*<sub class="lower-index">2</sub> (1 ≤ *x*<sub class="lower-index">1</sub> ≤ *x*<sub class="lower-index">2</sub> ≤ 100, 1 ≤ *y*<sub class="lower-index">1</sub> ≤ *y*<sub class="lower-index">2</sub> ≤ 100), where *x*<sub class="lower-index">1</sub> and *y*<sub class="lower-index">1</sub> are the number of the column and row of the lower left cell and *x*<sub class="lower-index">2</sub> and *y*<sub class="lower-index">2</sub> are the number of the column and row of the upper right cell of a rectangle.
arr = []
for x in range(100):
    arr.append([])
    arr[x] = [0 for i in range(100)]
n = int(input())
ans=0
for x in range(n):
    a, b, c, d = map(int, input().split())
    ans=ans+(c-a+1)*(d-b+1)
print(ans)




