#include<bits/stdc++.h>
using namespace std;
using Int = long long;
Int dp[30];
Int fib(Int n,Int x,Int y,int z=1){
  if(n<0) return 0;
  if(n<=z) return 1;
  if(dp[n]<0) dp[n]=fib(n-x,x,y,z)+fib(n-y,x,y,z);
  return dp[n];
}
signed main(){
  Int h,w;
  while(cin>>h>>w,h){
    memset(dp,-1,sizeof(dp));
    if((h*w)&1){
      cout<<0<<endl;
      continue;
    }
    
    if(h>w) swap(h,w);
    if(h==1){
      cout<<1<<endl;
      continue;
    }
    if(h==2){
      cout<<fib(w,h-1,h+1)+fib(w-h,h-1,h+1)<<endl;
      continue;
    }
    if(h&1) cout<<2*fib(w/2,(h-1)/2,(h+1)/2,0)<<endl;
    else cout<<fib(w,h-1,h+1)+fib(w-(h-2),h-1,h+1)+fib(w-h,h-1,h+1)<<endl;
  }
  return 0;
}


### Prompt

Your task is to create 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;
using Int = long long;
Int dp[30];
Int fib(Int n,Int x,Int y,int z=1){
  if(n<0) return 0;
  if(n<=z) return 1;
  if(dp[n]<0) dp[n]=fib(n-x,x,y,z)+fib(n-y,x,y,z);
  return dp[n];
}
signed main(){
  Int h,w;
  while(cin>>h>>w,h){
    memset(dp,-1,sizeof(dp));
    if((h*w)&1){
      cout<<0<<endl;
      continue;
    }
    
    if(h>w) swap(h,w);
    if(h==1){
      cout<<1<<endl;
      continue;
    }
    if(h==2){
      cout<<fib(w,h-1,h+1)+fib(w-h,h-1,h+1)<<endl;
      continue;
    }
    if(h&1) cout<<2*fib(w/2,(h-1)/2,(h+1)/2,0)<<endl;
    else cout<<fib(w,h-1,h+1)+fib(w-(h-2),h-1,h+1)+fib(w-h,h-1,h+1)<<endl;
  }
  return 0;
}


```