#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("tune=native")
using namespace std;
const int MAX = 9e5 + 5;
const long long MOD = 1000000007;
const long long MOD2 = 2010405347;
const long long INF = 2e18;
const int dr[] = {1, 0, -1, 0, 1, 1, -1, -1, 0};
const int dc[] = {0, 1, 0, -1, 1, -1, 1, -1, 0};
const double pi = acos(-1);
const double EPS = 1e-9;
const int block = 600;
int a, b, k, t, le, ri, x, y, dp[2][MAX];
long long ans;
bool ls, nw;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> a >> b >> k >> t;
  t <<= 1;
  le = ri = 450000 + a - b;
  dp[1][le] = 1;
  ls = 1;
  for (int iter = 1; iter <= t; ++iter) {
    memset(dp[nw], 0, sizeof dp[nw]);
    for (int i = le; i <= ri; ++i)
      dp[nw][i - k] += dp[ls][i], dp[nw][i + k + 1] -= dp[ls][i];
    le -= k, ri += k;
    for (int i = le + 1; i <= ri; ++i) {
      dp[nw][i] += dp[nw][i - 1];
      if (dp[nw][i] < 0)
        dp[nw][i] += MOD;
      else if (dp[nw][i] >= MOD)
        dp[nw][i] -= MOD;
    }
    nw ^= 1, ls ^= 1;
  }
  for (int i = 450001; i <= ri; ++i) ans += dp[ls][i];
  cout << ans % MOD << '\n';
  return 0;
}
