#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
	long long n,c,c2,m,broj,broj2;
	cin>>n>>m;
	if(n==1){
		cout<<m;
	} 
	else if(m==1){
		cout<<n;
	}
	else{
		c=2*n+(2*m-4);
		c2=n*m-c;
		broj=(c2+1)/2;
		broj2=n*m-broj;
		cout<<broj2;
	}
	return 0;
}