Farmer John has purchased a new robotic plow in order to relieve him from the drudgery of plowing field after field after field. It achieves this goal but at a slight disadvantage: the robotic plow can only plow in a perfect rectangle with sides of integer length.

Because FJ’s field has trees and other obstacles, FJ sets up the plow to plow many different rectangles, which might end up overlapping. He’s curious as to just how many squares in his field are actually plowed after he programs the plow with various plow instructions, each of which describes a rectangle by giving its lower left and upper right x,y coordinates.

As usual, the field is partitioned into squares whose sides are parallel to the x and y axes. The field is X squares wide and Y squares high (1 <= X <= 240; 1 <= Y <= 240). Each of the I (1 <= I <= 200) plow instructions comprises four integers: Xll, Yll, Xur, and Yur (1 <= Xll <= Xur; Xll <= Xur <= X; 1 <= Yll <= Yur; Yll <= Yur <= Y) which are the lower left and upper right coordinates of the rectangle to be plowed. The plow will plow all the field’s squares in the range (Xll..Xur, Yll..Yur) which might be one more row and column than would initially be assumed (depending on how you go about your assumptions, of course).

Consider a field that is 6 squares wide and 4 squares high. As FJ issues a pair of plowing instructions (shown), the field gets plowed as shown by ‘*’ and ‘#’ (normally plowed field all looks the same, but ‘#’ shows which were most recently plowed):

``````......             **....             #####.
......  (1,1)(2,4) **....  (1,3)(5,4) #####.
......             **....             **....
......             **....             **....
``````

A total of 14 squares are plowed.

POINTS: 25

Farmer John为了让自己从无穷无尽的犁田工作中解放出来，于是买了个新机器人帮助他犁田。这个机器人可以完成犁田的任务，可惜有一个小小的缺点：这个犁田机器人一次只能犁一个边的长度是整数的长方形的田地。

## 输入格式

* Line 1: Three space-separated integers: X, Y, and I

* Lines 2..I+1: Line i+1 contains plowing instruction i which is described by four integers: Xll, Yll, Xur, and Yur

## 输出格式

* Line 1: A single integer that is the total number of squares plowed

## 输入输出样例

```6 4 2
1 1 2 4
1 3 5 4
```

```14
```

## 说明/提示

``````#include<iostream>
#include<cstring>
#include<algorithm>
#include<cstdio>
using namespace std;
int a={0},m,n,s,i,j,k,x1,x2,y1,y2;
int main()
{
cin>>n>>s>>m;
for(k=1;k<=m;++k)
{
cin>>x1>>y1>>x2>>y2;
for(i=x1;i<=x2;++i)
for(j=y1;j<=y2;++j)
++a[i][j];
}
k=0;
for(i=1;i<=n;++i)
for(j=1;j<=s;++j)
if(a[i][j]!=0)
++k;
cout<<k;
return 0;
}``````