#include<iostream>
using namespace std;
unsigned long long m, n, u, s;
int main() {
	cin >> m >> n;
    if(m < 3 or n < 3){
        u = m * n;
    }else{
        s = 2 * m + 2 * (n - 2);
    	u = s + (m * n - s) / 2;    
    }
	cout << u;
	return 0;
}