import std.stdio;
import std.string;
import std.conv;

void main()
{
	auto input = split( readln() );
	long N = to!int(input[0]), M = to!int(input[1]);
	
	bool[][] table = [];
	int i = 0;
	while ( i <= M-1) {
		bool[] row = []; row.length = N;
		table ~= row;
		i+=1;
	}
	int counter = 0;
	
	void swap(ref bool[][] t, int x, int y) {
		if ( ! (0 <= x && x <= M-1 && 0 <= y && y <= N-1) ) { return; }
		if (t[x][y]) { t[x][y] = false; counter -= 1; }
		else { t[x][y] = true; counter += 1;} 
	}
	
	int j = 0; i = 0;
	
	while ( i <= M-1 ) {
		j = 0;
		
		while ( j <= N-1 ) {
			swap(table, i, j);
			swap(table, i-1, j);
			swap(table, i-1, j-1);
			swap(table, i, j-1);
			swap(table, i+1, j);
			swap(table, i+1, j+1);
			swap(table, i-1, j+1);
			swap(table, i+1, j-1);
			swap(table, i, j+1);
			j += 1;
		}
		i += 1;
	}
	
	writeln(counter);
	
}