#include <iostream> 
using namespace std;
void zamena(long long int* x, long long int* y) {
	long long int tmp;
	tmp = *x;
	*x = *y;
	*y = tmp;
}
int main()
{
	long long int x, y;
	cin >> x >> y;
	if (x == 1 || y == 1) (x > y) ? cout << x : cout << y;
	if (x % 2 == 0 || y % 2 == 0) {
		if(y%2==0)zamena(&x, &y);
		cout << 2 * x + 2 * (y - 2) + (x - 2) / 2 * (y - 2);
	}
	else {
		cout << 2 * x + 2 * (y - 2) + (((x - 2) / 2) * ((y - 1) / 2)) + ((x - 1) / 2) * ((y - 2) / 2);
	}
}