#include<cstdio>
#include<iostream>
#include<vector>
#include<cstring>
using namespace std;
int n,m,i,k;
int f[55][55];
int main(){
freopen("ballg.in","r",stdin);
freopen("ballg.out","w",stdout);
scanf("%d%d",&n,&m);
memset(f,0,sizeof(f));
f[1][0]=1;
for (k=1;k<=m;k++){
for (i=2;i<n;i++)
f[i][k]+=f[i-1][k-1]+f[i+1][k-1];
f[1][k]+=f[n][k-1]+f[2][k-1];
f[n][k]+=f[1][k-1]+f[n-1][k-1];
}
printf("%d\n",f[1][m]);
return 0;
}