#include #define int long long #define FOR( i, m, n ) for( int (i) = (m); (i) < (n); (i)++ ) #define REP( i, n ) FOR( i, 0, n ) #define REPR( i, m ) for( int (i) = (m); (i) >= 0; (i)-- ) #define ALL( a ) (a).begin(), (a).end() #define MP make_pair using namespace std; using P = pair; templatebool chmax( T& a, const T& b ) { if( a < b ) { a = b; return 1; } return 0; } templatebool chmin( T& a, const T& b ) { if( a > b ) { a = b; return 1; } return 0; } const int INF = 1e18; const int MOD = 1e9 + 7; int dp[101][20001]; signed main(){ int N, S, K; cin >> N >> S >> K; FOR( i, 1, N ){ S -= i * K; } dp[0][0] = 1; FOR( i, 1, N + 1 ){ REP( j, S + 1 ){ if( j - i >= 0 ){ dp[i][j] = ( dp[i - 1][j] + dp[i][j - i] ) % MOD; }else{ dp[i][j] = dp[i - 1][j]; } } } cout << dp[N][S] << endl; }