#include <bits/stdc++.h>
using namespace std;

int const maxN = 12;

bool used [maxN] [maxN];
int rows, cols;

int64_t go (int row, int col)
{
	if (col >= cols)
	{
		row += 1;
		col = 0;
		if (row >= rows)
		{
			return 1;
		}
	}

	if (used[row][col])
	{
		return go (row, col + 1);
	}

	int64_t res = 0;
	if (col + 1 < cols && !used[row][col + 1])
	{
		used[row][col] = true;
		used[row][col + 1] = true;
		res += go (row, col + 1);
		used[row][col + 1] = false;
		used[row][col] = false;
	}
	if (row + 1 < rows && !used[row + 1][col])
	{
		used[row][col] = true;
		used[row + 1][col] = true;
		res += go (row, col + 1);
		used[row + 1][col] = false;
		used[row][col] = false;
	}
	return res;
}

int main ()
{
	while (cin >> rows >> cols)
	{
		memset (used, 0, sizeof (used));
		cout << go (0, 0) << endl;
	}
	return 0;
}
