#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;
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 = -2 * k, j = 1; i <= 0; i++, j++) g[i + 2 * k] = j;
  for (int i = 1, j = 2 * k; i <= 2 * k; i++, j--) g[i + 2 * k] = j;
  const int M = 2e5 + 200 + a - b;
  int cur = 1;
  dp[0][M] = 1;
  for (int i = 0; i <= 4 * k; i++) sum[0][i + M] = 1;
  auto f = [&](int x, int l, int r) {
    return (sum[x][r] - sum[x][l - 1] + mod) % mod;
  };
  for (int i = 1; i <= t; i++) {
    ll pre = 0;
    for (int j = -2 * i * k, 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; j <= 2 * i * k; 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;
    }
    sum[cur][-2 * (i + 2) * k + M] = dp[cur][-2 * (i + 2) * k + M];
    for (int j = -2 * (i + 2) * k + M + 1; j <= 2 * (i + 2) * k + M; j++)
      (sum[cur][j] = sum[cur][j - 1] + dp[cur][j]) %= mod;
    cur ^= 1;
  }
  ll ans = 0;
  for (int i = -2 * t * k; i <= 2 * t * k; i++)
    if (i + a - b > 0) ans = (ans + dp[cur ^ 1][i + M]) % mod;
  cout << ans;
  return 0;
}
