#include<stdio.h>




static int pole [20001][20001];

void napln (int x,int y)
{

int i,j;

    for (i=0;i<x;i++)
    {
    for (j=0;j<y;j++)
	{
		pole[i][j]=0;
	}
    
    }
}


void naplnr (int x,int y,int d)
{

int i,j;

    for (i=0;i<x;i++)
    {
    for (j=0;j<y;j++)
	{
	if (d==i) pole[i][j]=1;
	}
    
    }

}



void naplns (int x,int y,int d)
{

int i,j;

    for (i=0;i<x;i++)
    {
    for (j=0;j<y;j++)
	{
	if (d==j) pole[i][j]=1;
	}
    
    }

}


void naplnd1 (int x,int y,int s1,int s2)
{

int i,j;
i=s1;
j=s2;
    
while ((i != 0) && (j != 0))
{
    pole[i][j]=1;
    i--;
    j--;

}
pole[i][j]=1;
    

i=s1;
j=s2;
while ((i != x) && (j != y))
{
    pole[i][j]=1;
    i++;
    j++;

}
pole[i][j]=1;

i=s1;
j=s2;
while ((i != 0) && (j != y))
{
    pole[i][j]=1;
    i--;
    j++;

}

pole[i][j]=1;

i=s1;
j=s2;
while ((i != x) && (j != 0))
{
    pole[i][j]=1;
    i++;
    j--;

}
pole[i][j]=1;
}


unsigned long int scitaj (int x,int y)
{
unsigned long int pocet=0;
int i,j;

    for (i=0;i<x;i++)
    {
    for (j=0;j<y;j++)
	{
	if (pole[i][j]==0)
	pocet++;
	}
    
    }
    return pocet;
}


int main()
{
    /*int a,b,c,t,e,f;
    for ( ; ; )
    {
	scanf("%d%d%d",&a,&b,&c);
	if ((a==0) && (b==0)&& (c==0)) return(0);
	napln(a,b);
	for (t=0;t<c;t++) 
	{
	    scanf("%d%d",&e,&f);
	    naplnr(a,b,e-1);
	    naplns(a,b,f-1);
	    naplnd1(a,b,e-1,f-1);
	}
	printf ("%lu\n",scitaj(a,b));
    }
    */
    return 0;
}



