#include <bits/stdc++.h>
using namespace std;

int a,b;
long long d;

int main(){

	cin >> a >> b;
	long long c=a*b;
	if(a==1 or b==1 or a==2 or b==2) cout << c << endl;
	else{
		a-=2;
		b-=2;
		if(a%2==0 or b%2==0) d=a*b/2;
		else  d=a*b/2+1;
		cout << c-d << endl;
	}



return 0;
}