#include <bits/stdc++.h>
using namespace std;
#define gc getchar_unlocked
#define fo(i,n) for(i=0;i<n;i++)
#define Fo(i,k,n) for(i=k;i<n;i++)
#define ll long long
#define si(x) scanf("%d",&x)
#define sl(x) scanf("%I64d",&x)
#define ss(s) scanf("%s",s)
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define clr(x) memset(x, 0, sizeof(x))
#define sortall(x) sort(all(x))
#define tr(it, a) for(auto it = a.begin(); it != a.end(); it++)
#define PI 3.1415926535897932384626
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
const int mod = 1000000007;
const int N = 1e5+3;
int a, b, k, T;
ll dp[103][N];
ll dp2[103][N];
int go(int t, int score){
if (t == 0 and score <= 0)return 1;
if (t == 0)return 0;
int i;
ll ans ;
if (score>=0){
ans = dp[t][score];
}
else ans = dp2[t][-score];
if (ans != -1) return ans;
ans = 0;
for(i=-2*k; i <= 2*k; i++){
ll ways = max(0, 2*k - abs(i) + 1);
if (ways>0){
ans += (ways*(go(t-1, score-i)) ) % mod;
ans %= mod;
}
}
if (score>=0) dp[t][score] = ans;
else dp2[t][-score] = ans;
return ans;
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int i, j;
cin>>a>>b>>k>>T;
Fo(i, 0, 103)Fo(j, 0, N) dp[i][j] = dp2[i][j] = -1;
cout<<go(T, b-a+1);
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiNkZWZpbmUgZ2MgZ2V0Y2hhcl91bmxvY2tlZAojZGVmaW5lIGZvKGksbikgZm9yKGk9MDtpPG47aSsrKQojZGVmaW5lIEZvKGksayxuKSBmb3IoaT1rO2k8bjtpKyspCiNkZWZpbmUgbGwgbG9uZyBsb25nCiNkZWZpbmUgc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