#include<bits/stdc++.h>
using namespace std;
int main(){
	int n, m, redar, uredara;
	cin>>n>>m;
	redar=n*m-(n-2)*(m-2);
	if(m%2==0){
		uredara=redar+(n*m-redar)/2;
	}
	else if(m%2!=0){
		if(n%2==0){
			uredara=redar+(n-2)*(m-2)/2;
		}
		if(n%2!=0){
			uredara=redar+(n-3)*(m-2)/2+(m-2)/2;
		}
	}
	cout<<uredara<<"\n";
}