// 1
// 2
// 3
// 4

#include <cstdio>
#include <cassert>
#include <cstring>
#include <algorithm>
#include <string>

using namespace std;

// Í.Î.Ï.

#define forn(i, n) for (int i = 0; i < (int)(n); i++)

const int N = 10;

int w, h, u[N][N];

// 2^{wh/2} wh <= 50
int go( int x, int y )
{
  if (x == w)
    x = 0, y++;
  if (y == h)
    return 1;
  if (u[y][x])
    return go(x + 1, y);

  int sum = 0;
  if (x + 1 < w && !u[y][x + 1])
  {
    u[y][x] = u[y][x + 1] = 1;
    sum += go(x + 1, y);
    u[y][x] = u[y][x + 1] = 0;
  }
  if (y + 1 < h && !u[y + 1][x])
  {
    u[y][x] = u[y + 1][x] = 1;
    sum += go(x + 1, y);
    u[y][x] = u[y + 1][x] = 0;
  }
  return sum;
}

int main()
{
  assert(scanf("%d%d", &w, &h) == 2);
  printf("%d\n", go(0, 0));
  return 0;
}