#include <iostream>
//#include <fstream>
//#include <iomanip>
//#include <cmath>
//#include <algorithm>
//#include <string>
//#include <vector>
//#include <utility>
//#include <map>
//#include <ctime>
//#include <cctype>
//#include <cstdlib>
//#include <limits>
//#include <numeric>
//#include <mycpp.h>

using namespace std;

int main()
{
	std::ios_base::sync_with_stdio(false);
	int n, m;
	cin >> n >> m;
	if(n < 3 || m < 3) {
		cout << n * m;
		return 0;
	}
	int navijaca = ((n - 2) * (m - 2) + 1) / 2;
	int res = n * m - navijaca;
	cout << res;
}