#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cstdlib>
using namespace std;
long long n,K,k,S[1000],num[1000],s0=0,ans=0;
long long f[12][520][111];
int main()
{
freopen("placeking.in","r",stdin);
freopen("placeking.out","w",stdout);
scanf("%d%d",&n,&K);
for (int i=0;i<1<<n;++i)
{
if (i&(i<<1)) continue;
k=0;
for (int j=0;j<n;++j)
if (i&(1<<j)) k++;
S[++s0]=i;
num[s0]=k;
}
f[0][1][0]=1;
for (int i=1;i<=n;i++)
for (int t=1;t<=s0;++t)
{
int s1=S[t];
for (int l=0;l<=K;++l)
{
if (!f[i-1][t][l]) continue;
for (int j=1;j<=s0;++j)
{
int s2=S[j];
if ((s1&s2)||(s1&(s2<<1))||(s1&(s2>>1))) continue;
if (num[j]+l>K) continue;
f[i][j][l+num[j]]+=f[i-1][t][l];
}
}
}
for (int i=1;i<=s0;++i)
ans+=f[n][i][K];
cout<<ans;
return 0;
}