#include <bits/stdc++.h>
using namespace std;

int const maxN = 12;

int64_t f [maxN + 1] [1 << maxN];
int rows, cols;

void go (int row, int col, int oldMask, int newMask)
{
	if (col >= cols)
	{
		f[row + 1][newMask] += f[row][oldMask];
		return;
	}

	if (oldMask & (1 << col))
	{
		go (row, col + 1, oldMask, newMask);
		return;
	}

	if (col + 1 < cols && !(oldMask & (1 << (col + 1))))
	{
		go (row, col + 2, oldMask, newMask);
	}

	go (row, col + 1, oldMask, newMask | (1 << col));
}

int main ()
{
	while (cin >> rows >> cols)
	{
		memset (f, 0, sizeof (f));
		f[0][0] = 1;
		for (int row = 0; row < rows; row++)
		{
			for (int mask = 0; mask < (1 << cols); mask++)
			{
				if (f[row][mask] > 0)
				{
					go (row, 0, mask, 0);
				}
			}
		}
		cout << f[rows][0] << endl;
	}
	return 0;
}
