#include <iostream>
#include <cmath>

using namespace std;

int main() {
	
	unsigned long long n;
	unsigned long long m;
	unsigned long long finalempty;
	double finalcut;
	cin >> n >> m;
	
	finalcut =(float) (n - 2) * (m - 2) / 2;
	
	finalempty = ceil(finalcut);
	
	finalnonempty = n * m - finalempty;
	
	cout << finalnonempty;
	
	return 0;
}