#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int exp( int bs, int po)
{
int ans = 1 ;
while(po)
{
if(po&1) ans*=bs;
bs*=bs;
po>>=1;
}
return ans;
}
ll m , n , k ;
int dp[32800][51][51];
ll rec(int vtx , vector<vector<int> > &g,ll sum ,ll idx,vector<int>&ct)
{
ll tp = 0;
if(sum > k || idx > n)
return 0 ;
if( idx == n && sum == k )
tp = 1 ;
if(dp[vtx][sum][idx]!=-1)
{
return dp[vtx][sum][idx];}
for( size_t i = 0 ; i<g[vtx].size() ; i ++ )
{
int vt = g[vtx][i] ;
tp += rec( vt , g , sum + ct[ vt ] , idx + 1 ,ct);
}
dp[vtx][sum][idx] = tp;
return tp;
}
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cin>>m>>n>>k;
vector<int>vst; // To store valid states
vector<vector<int> > g(32800); // to store paths form one valid state to another
vector<int>ct(32800); // to store number of 1s in ach valid state
//vector<int>idx(32800);
// finding the valid states
for( int i = 0 ; i < exp(2,m) ; i ++ )
for( int j = 1; j <32 ; j ++ )
{
if( (1<<j)&i && (1<<(j-1))&i )
break;
if(j==31)
vst.push_back(i);
}
// finding the paths
for( size_t i =0 ; i < vst.size() ; i ++ )
for( size_t j = 0 ; j < vst.size() ; j ++ )
for( size_t k = 0 ; k < 32 ; k ++ )
{
if( 1<<k & vst[i] && 1<<k & vst[j])
break;
if(k==31)g[vst[i]].push_back(vst[j]);
}
// finding the number of 1s in a valid state
for( size_t i = 0 ; i < vst.size() ; i++ )
{ int tp = 0 ;
for( int j = 0 ; j < 32 ; j++ )
if(1<<j & vst[i])
tp++;
ct[vst[i]] = tp ;
}
ll sum = 0 ;
memset(dp,-1,sizeof(dp));
for( size_t i = 0 ; i < vst.size() ; i ++ )
sum+= rec(vst[i],g, ct[vst[i]] ,1,ct);
cout<< sum<<endl;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgp0eXBlZGVmIGxvb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BwYXRocyBmb3JtIG9uZSB2YWxpZCBzdGF0ZSB0byBhbm90aGVyCiAgdmVjdG9yPGludD5jdCgzMjgwMCk7IC8vIHRvIHN0b3JlIG51bWJlciBvZiAxcyBpbiBhY2ggdmFsaWQgc3RhdGUgIAoKICAvL3ZlY3RvcjxpbnQ+aWR4KDMyODAwKTsKCi8vIGZpbmRpbmcgdGhlIHZhbGlkIHN0YXRlcyAKICBmb3IoIGludCBpID0gIDAgOyBpIDwgZXhwKDIsbSkgOyBpICsrICkKICAgIGZvciggaW50IGogPSAxOyBqIDwzMiA7IGogKysgKQogICAgICB7CiAgICAgICAgICAgaWYoICgxPDxqKSZpICAmJiAoMTw8KGotMSkpJmkgKQogICAgICAgICAgICAgICBicmVhazsKCiAgICAgICAgICAgaWYoaj09MzEpCiAgICAgICAgICAgICB2c3QucHVzaF9iYWNrKGkpOwogICAgICB9CgoKLy8gZmluZGluZyB0aGUgcGF0aHMgCiAgIGZvciggc2l6ZV90IGkgPTAgOyBpIDwgdnN0LnNpemUoKSA7IGkgKysgKQogICAgIGZvciggc2l6ZV90IGogPSAwIDsgaiA8ICB2c3Quc2l6ZSgpIDsgaiArKyApCiAgICAgICAgIGZvciggc2l6ZV90ICBrID0gMCA7IGsgPCAzMiA7IGsgKysgICkKICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBpZiggMTw8ayAmIHZzdFtpXSAgJiYgIDE8PGsgJiB2c3Rbal0pCiAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CgogICAgICAgICAgICAgICAgICBpZihrPT0zMSlnW3ZzdFtpXV0ucHVzaF9iYWNrKHZzdFtqXSk7CiAgICAgICAgICAgICAgIH0KCgovLyBmaW5kaW5nIHRoZSBudW1iZXIgb2YgMXMgaW4gIGEgdmFsaWQgc3RhdGUgCgogICAgICAgZm9yKCBzaXplX3QgaSA9IDAgOyBpIDwgdnN0LnNpemUoKSA7IGkrKyApCiAgICAgICAgICAgIHsgaW50IHRwID0gMCA7CiAgICAgICAgICAgICAgIGZvciggaW50IGogPSAwIDsgaiA8IDMyIDsgaisrICkKICAgICAgICAgICAgICAgICAgIGlmKDE8PGogJiB2c3RbaV0pCiAgICAgICAgICAgICAgICAgICAgICAgdHArKzsKCiAgICAgICAgICAgICAgIGN0W3ZzdFtpXV0gPSB0cCA7CiAgICAgICAgICAgIH0KCgogICAgICAgbGwgc3VtID0gMCA7CgogICAgICBtZW1zZXQoZHAsLTEsc2l6ZW9mKGRwKSk7CiAgICAgICBmb3IoIHNpemVfdCBpID0gMCA7IGkgPCB2c3Quc2l6ZSgpIDsgaSArKyApCiAgICAgICAgICAgc3VtKz0gcmVjKHZzdFtpXSxnLCBjdFt2c3RbaV1dICwxLGN0KTsKCiAgICAgIGNvdXQ8PCBzdW08PGVuZGw7Cn0K