#include <iostream>
using namespace std;
int main(int argc, char** argv) {
	
	int n,m;
	cin>>n>>m;
    if ((n<=2) or (m<=2)) cout<<n*m;
    else{
	    if ((n%2==1) and (m%2==1)) cout<<n*m-(((n-2)*(m-2))/2)-1;
	    else cout<<n*m-(((n-2)*(m-2))/2);
    }
	return 0;
}