#include "bits/stdc++.h" #define ALL(g) (g).begin(),(g).end() #define REP(i, x, n) for(int i = x; i < n; i++) #define rep(i,n) REP(i,0,n) #define RREP(i, x, n) for(int i = x; i >= n; i--) #define rrep(i, n) RREP(i,n,0) #define pb push_back #define show_table(n, k, table) rep(i,n){ rep(j,k) cout << table[i][j] << " "; cout << endl;} template void chmax(T& a,const T& b){a=max(a,b);} template void chmin(T& a,const T& b){a=min(a,b);} using namespace std; using ll = long long; using P = pair; using Pl = pair; using vi = vector; using vvi = vector; const int mod=1e9+7,INF=1<<30; const double EPS=1e-12,PI=3.1415926535897932384626; const ll lmod = 1e9+7,LINF=1LL<<60; const int MAX_N = 302; ll dp[MAX_N][MAX_N*MAX_N/2],sum[MAX_N][MAX_N*MAX_N/2]; int main(){ int N,K; cin >> N >> K; // int a; rep(i,N) cin >> a; dp[0][0] = 1; rep(j,K+1) sum[0][j] = 1LL; REP(i,1,N){ rep(j,K+1){ if(min(i,j)<=j-1) dp[i][j] = (sum[i-1][j] - sum[i-1][j-min(i,j)-1])%lmod; else dp[i][j] = sum[i-1][j]; } sum[i][0] = 1LL; REP(j,1,K+1) sum[i][j] = (sum[i][j-1] + dp[i][j])%lmod; } // show_table(N,K+1,dp); cout << sum[N-1][K] << endl; return 0; }