/*
#include<stdio.h>
int a,high[101][101],high2[101][101],cnt=0;
dfs(int i,int j,int k)
{
if(i<1||i>a||j<1||j>a||high[i][j]<=k)
{
return;
}
high[i][j]=-1;
dfs(i+1,j,k);
dfs(i,j+1,k);
dfs(i-1,j,k);
dfs(i,j-1,k);
}
void copymap()
{
int i, j;
for(i=1; i<=a; i++)
{
for(j=1; j<=a; j++)
{
high[i][j]=high2[i][j];
}
}
}
int main()
{
int i,j,k,max=1;
scanf("%d",&a);
for(i=1; i<=a; i++)
{
for(j=1; j<=a; j++)
{
scanf("%d",&high[i][j]);
high2[i][j]=high[i][j];
}
}
for(k=1; k<=100; k++)
{
cnt=0;
for(j=1; j<=a; j++)
{
for(i=1; i<=a; i++)
{
if(high[i][j]>k)
{
cnt++;
dfs(i,j,k);
}
}
}
if(max<cnt)
{
max=cnt;
}
copymap();
}
printf("%d",max);
}
*/
#include<stdio.h>
int color[101][101]= {};
int main()
{
int M,N,K,i,j,x1[11][11],y1[11][11],x2[11][11],y2[11][11],a,b;
scand("%d %d %d",&M,&N,&K);
for(i=1; i<=K; i++)
{
scanf("%d %d %d %d",&x1[i][j],&y1[i][j],&x2[i][j],&y2[i][j]);
for(a=x1[i][j]; a<=x2[i][j]; a++)
{
for(b=y1[i][j]; b<=y2[i][j]; b++)
{
color[a][b]=1;
}
}
}
}