#include <iostream>
#include <cmath>

using namespace std;

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