/****************##### بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيم #####********************
__________________________________________________________________________
###################### Ya-Seen Arafat(ACWizard) #########################
###################### UAP-CSE-33B #########################
*************************************************************************/
#include <bits/stdc++.h>
#define sc(n) scanf("%d", &n)
#define S 303
using namespace std;
typedef long long LL;
int n, low, high;
int make[S];
LL dp[S][S][S];
LL Pay(int ind, int tot, int term){
if(term > high)return 0LL;
if(tot < 0)return 0LL;
if(term >= low && term <= high && tot == 0)return 1LL;
if(dp[ind][tot][term] != -1)return dp[ind][tot][term];
dp[ind][tot][term] = 0;
for(int i = ind; i < n; i++){
dp[ind][tot][term] += Pay(i, tot-make[i], term+1);
}
return dp[ind][tot][term];
}
void Do(){
string str;
while(getline(cin, str)){
istringstream cinn(str);
int sz = str.size();
int sp = 0;
for(int i = 0; i < sz; i++)if(str[i] == ' ')sp++;
if(sp == 0)cinn >> n, low = 1, high = n;
if(sp == 1)cinn >> n, cinn >> high, low = 1;
if(sp == 2)cinn >> n, cinn >> low, cinn >> high;
for(int i = 0; i < n; i++)make[i] = i+1;
reverse(make, make+n);
memset(dp, -1, sizeof(dp));
cout << Pay(0, n, 0) << endl;
}
}
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
#ifndef ONLINE_JUDGE
///freopen("inp","r",stdout);
///freopen("contest.txt","w",stdout);
#endif
Do();
return 0;
}
LyoqKioqKioqKioqKioqKiojIyMjIyAgICDYqNmQ2LPZktmF2ZAg2KfZhNmE2Y7ZkdmH2ZAg2KfZhNix2Y7Zkdit2ZLZhdmO2YbZkCDYp9mE2LHZjtmR2K3ZkNmK2YUgICAjIyMjIyoqKioqKioqKioqKioqKioqKioqCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMgIFlhLVNlZW4gQXJhZmF0KEFDV2l6YXJkKSAjIyMjIyMjIyMjIyMjIyMjI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