#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pli = pair<ll, int>;
const int INF = 0x3f3f3f3f, N = 4.1e5 + 5, M = 2e5 + 200;
const ll LINF = 1e18 + 5;
constexpr int mod = 1e9 + 7;
int a, b, k, t;
ll dp[2][N], sum[2][N], g[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> a >> b >> k >> t;
  for (int i = -k; i <= k; i++)
    for (int j = -k; j <= k; j++) g[i - j + 2 * k]++;
  int cur = 1;
  dp[0][a - b + M] = 1;
  for (int i = a - b; i <= 4 * k + a - b; i++) sum[0][i + M] = 1;
  auto f = [&](int x, int l, int r) {
    return (sum[x][r] - sum[x][l - 1] + mod) % mod;
  };
  ll ans = 0;
  for (int i = 1; i <= t; i++) {
    ll pre = 0;
    for (int j = -2 * i * k + a - b, w = -2 * k; w <= 2 * k; w++)
      (pre += dp[cur ^ 1][j + w + M] * g[-w + 2 * k] % mod) %= mod;
    for (int j = -2 * i * k + a - b; j <= 2 * i * k + a - b; j++) {
      dp[cur][j + M] = pre;
      pre = (pre - f(cur ^ 1, j - 2 * k + M, j + M) +
             f(cur ^ 1, j + 1 + M, j + 2 * k + 1 + M)) %
            mod;
      pre = (pre + mod) % mod;
      if (i == t && j > 0) (ans += dp[cur][j + M]) %= mod;
    }
    sum[cur][-2 * (i + 2) * k + a - b + M] =
        dp[cur][-2 * (i + 2) * k + a - b + M];
    for (int j = -2 * (i + 2) * k + a - b + M + 1;
         j <= 2 * (i + 2) * k + a - b + M; j++)
      (sum[cur][j] = sum[cur][j - 1] + dp[cur][j]) %= mod;
    cur ^= 1;
  }
  cout << ans;
  return 0;
}
