#include <bits/stdc++.h>
using namespace std;

int main() {
    int H, W;
    while(cin >> H >> W, H) {
        vector<vector<int>> tatami(H, vector<int>(W, -1));

        auto cond_check = [&](int y, int x) {
            return y == 0 || x == 0
            || tatami[y - 1][x - 1] == tatami[y - 1][x] || tatami[y][x - 1] == tatami[y][x]
            || tatami[y - 1][x - 1] == tatami[y][x - 1] || tatami[y - 1][x] == tatami[y][x];
        };

        long long id = 0;
        function<int(int, int)> solve = [&](int y, int x) {
            if(y == H - 1 && x == W - 1 && tatami[y][x] != -1) return 1;
            if(x >= W) return solve(y + 1, 0);
            if(tatami[y][x] != -1) return solve(y, x + 1);
            if(!cond_check(y, x)) return 0;

            int res = 0;
            if(y + 1 < H) { // put vert
                tatami[y][x] = tatami[y + 1][x] = id++;
                res += solve(y, x + 1);
                tatami[y][x] = tatami[y + 1][x] = -1;
            }
            if(x + 1 < W && tatami[y][x + 1] == -1) { // put hori
                tatami[y][x] = tatami[y][x + 1] = id++;
                res += solve(y, x + 1);
                tatami[y][x] = tatami[y][x + 1] = -1;
            }

            return res;
        };

        cout << solve(0, 0) << endl;
    }
}


### Prompt

Your challenge is to write a Cpp solution to the following problem:

A tatami mat, a Japanese traditional floor cover, has a rectangular form with aspect ratio 1:2. When spreading tatami mats on a floor, it is prohibited to make a cross with the border of the tatami mats, because it is believed to bring bad luck.

Your task is to write a program that reports how many possible ways to spread tatami mats of the same size on a floor of given height and width.



Input

The input consists of multiple datasets. Each dataset cosists of a line which contains two integers H and W in this order, separated with a single space. H and W are the height and the width of the floor respectively. The length of the shorter edge of a tatami mat is regarded as a unit length.

You may assume 0 < H, W ≤ 20.

The last dataset is followed by a line containing two zeros. This line is not a part of any dataset and should not be processed.

Output

For each dataset, print the number of possible ways to spread tatami mats in one line.

Example

Input

3 4
4 4
0 0


Output

4
2

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;

int main() {
    int H, W;
    while(cin >> H >> W, H) {
        vector<vector<int>> tatami(H, vector<int>(W, -1));

        auto cond_check = [&](int y, int x) {
            return y == 0 || x == 0
            || tatami[y - 1][x - 1] == tatami[y - 1][x] || tatami[y][x - 1] == tatami[y][x]
            || tatami[y - 1][x - 1] == tatami[y][x - 1] || tatami[y - 1][x] == tatami[y][x];
        };

        long long id = 0;
        function<int(int, int)> solve = [&](int y, int x) {
            if(y == H - 1 && x == W - 1 && tatami[y][x] != -1) return 1;
            if(x >= W) return solve(y + 1, 0);
            if(tatami[y][x] != -1) return solve(y, x + 1);
            if(!cond_check(y, x)) return 0;

            int res = 0;
            if(y + 1 < H) { // put vert
                tatami[y][x] = tatami[y + 1][x] = id++;
                res += solve(y, x + 1);
                tatami[y][x] = tatami[y + 1][x] = -1;
            }
            if(x + 1 < W && tatami[y][x + 1] == -1) { // put hori
                tatami[y][x] = tatami[y][x + 1] = id++;
                res += solve(y, x + 1);
                tatami[y][x] = tatami[y][x + 1] = -1;
            }

            return res;
        };

        cout << solve(0, 0) << endl;
    }
}


```