#include<bits/stdc++.h>
using namespace std;
#define bp __builtin_popcount
long long dp[10][1000][100];
long long sta[2000];
int top=0;
int n,k;
int main(){
scanf("%d%d",&n,&k);
for(int s=0;s<=(1<<n)-1;s++){
if((((s<<1)|(s>>1))&s)==0) sta[++top]=s;
}
dp[0][0][0]=1;
for(int i=1;i<=n;i++){
for(int ids=1;ids<=top;ids++){
int st=sta[ids];
for(int idr=1;idr<=top;idr++){
int str=sta[idr];
if(((str|(str<<1)|(str>>1))&st)==0){
for(int j=0;j<=k;j++){
if(j-bp(st)>=0)
dp[i][ids][j]+=dp[i-1][idr][j-bp(st)];
}
}
}
}
}
long long ans=0;
for(int i=1;i<=top;i++) ans+=dp[n][i][k];
printf("%lld\n",ans);
return 0;
}