#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
const long long int maxS = 100500;
const long long int maxT = 101;
long long int a, b, k, t;
long long int dp[maxT][2 * maxS + 1];
long long int prefSumm[2 * maxS + 1];
long long int dpPrefSumm[2 * maxS + 1];
void init() {
  for (long long int i = -k; i <= k; i++) dp[0][i + maxS] = 1;
  dpPrefSumm[0] = dp[0][0];
  for (long long int j = -maxS + 1; j <= maxS; j++)
    dpPrefSumm[j + maxS] = (dpPrefSumm[j + maxS - 1] + dp[0][j + maxS]) % mod;
  for (long long int i = 1; i < t; i++) {
    for (long long int j = -maxS; j <= maxS; j++) {
      long long int last = min(2 * maxS - 1, maxS + j + k);
      long long int start = maxS + j - k - 1;
      dp[i][j + maxS] = (dp[i][j + maxS] + dpPrefSumm[last]) % mod;
      if (start >= 0)
        dp[i][j + maxS] = (dp[i][j + maxS] - dpPrefSumm[start] + mod) % mod;
    }
    dpPrefSumm[0] = dp[i][0];
    for (long long int j = -maxS + 1; j <= maxS; j++)
      dpPrefSumm[j + maxS] = (dpPrefSumm[j + maxS - 1] + dp[i][j + maxS]) % mod;
  }
  prefSumm[0] = dp[t - 1][0];
  for (long long int i = -maxS + 1; i <= maxS; i++)
    prefSumm[i + maxS] = (prefSumm[i - 1 + maxS] + dp[t - 1][i + maxS]) % mod;
}
signed main() {
  cin >> a >> b >> k >> t;
  init();
  long long int ans = 0;
  for (long long int s = -maxS; s <= maxS; s++) {
    long long int s1 = maxS + a + s - b - 1, pl = 0;
    if (s1 >= 0) {
      pl = (pl + (dp[t - 1][s + maxS] * prefSumm[s1]) % mod) % mod;
      ans = (ans + pl) % mod;
    }
  }
  cout << ans;
  return 0;
}
