#include <stdio.h>

int main()
{
long long int n,m;
scanf("%lli%lli" ,&n ,&m);
if(m==1 || n==1){
printf("%lli" ,m*n);
return 0;}
if(m%2==0 || n%2==0)
printf("%lli\n",n*m-(n-2)*(m-2)/2);
else
printf("%lli\n",n*m-(n-2)*(m-2)/2-1);

return 0;
}