#include <iostream>
using namespace std;

int main()
{
	long long N, M;
	bool jeste = false, poseban = false;
	
	cin>>N>>M;
		
	if(N%2!=0 && M%2!=0)
	{
		poseban = true;
	}
	
	if(N<=2 || M<=2)
	{
	    jeste = true;
	}
	
	if(jeste)
	{
		cout<<M*N;
	}else
	{
		if(poseban)
		{
			cout<<N*M - ((N-1)*(M-1))/4 - ((N-3)*(M-3))/4;
		}else
		{
			cout<<N*M - ((N-2)*(M-2))/2;
		}
		
	}
	
	return 0;
}