#include <bits/stdc++.h>
using namespace std;
int chess[55][55], book[55][55];
int n, m, cnt = 0;
int dx[4] = {1, 0};
int dy[4] = {0, 1};

int judge(int x, int y)
{
    if (x % 2 == 0 && y % 2 == 0)
        return 0;
    return 1;
}

void dfs(int x, int y)
{
    if (x == n && y == m)
    {
        cnt++;
        return;
    }

    book[1][1] = 1;
    for (int i = 0; i < 2; i++)
    {
        int tx = x + dx[i];
        int ty = y + dy[i];
        if (tx >= 1 && tx <= n && ty >= 1 && ty <= m && judge(tx, ty) && book[tx][ty] == 0)
        {
            book[tx][ty] = 1;
            dfs(tx, ty);
            book[tx][ty] = 0;
        }
    }
}

int main()
{
    cin >> n >> m;
    dfs(1, 1);
    cout << cnt;
    return 0;
}
