#include <stdio.h>
#include <math.h>

main(){
	long long unsigned n,m;
	scanf("%llu%llu", &n,&m);
	long long unsigned i,a[n][m],c=0,j;
	for(i=0;i<n;i++) for(j=0;j<m;j++) {
		if(i==0 || i == n-1) c++;
		else if(i%2==0 && i!=0 && j!=m/2) c++;
		else if(i%2!=0 && i!=n-1 && j%2==0) c++;
	}
	printf("%llu", c);
}