/* Aufgabe d, Locals 2000 by Peter Schaeffer */

#include <stdio.h>

#define exp(x) (1<<(x))

int x, y, i, j, k;
int m[32];
double r[16][2048];
int pi[8192], pj[8192], np, pp;

void fillconnect(int pat, int pos)
{
  int i;
  if ((pat & m[pos]) == 0)
    {
      pi[np] = exp(y)-1-((pat|m[pos])% exp(y));
      pj[np] = (pat|m[pos])/ exp(y);
      ++np;
      for(i=pos+1; i<y+y-1; i++)
	fillconnect(pat|m[pos], i);
    }
}

void precompute()
{
  np = 0;
  for(j=0; j<y; j++) m[j] = (1+exp(y)) << j;
  for(j=0; j<y-1; j++) m[y+j] = 3 << j;
  m[y+y-1] = 0;
  for(j=0; j<2*y; j++)
    fillconnect(0,j);
}

int main()
{
  FILE *input = stdin;
  while(1)
    {
      fscanf(input, " %d %d ", &x, &y);
      if (x == 0) break;
      if ((x*y)%2 == 1) printf("0\n");
      else
	{
	  if (x<y){i=x; x=y; y=i;}
	  precompute();
	  for(i=0; i<exp(y); i++)
	    for(j=0; j<=x; j++) r[j][i] = 0.0;
	  r[0][0] = 1.0;
	  for(k=1; k<=x; k++)
            for (pp=0; pp<np ; pp++)
              r[k][pj[pp]] += r[k-1][pi[pp]];
	  printf("%0.0f\n", r[x][0]);
	}
    }
  fclose(input);
  return 0;
}
