#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T, class U>
ostream& operator<<(ostream& o, const pair<T, U>& p) {
  o << "(" << p.first << "," << p.second << ")";
  return o;
}
template <class T>
ostream& operator<<(ostream& o, const vector<T>& v) {
  o << "[";
  for (T t : v) {
    o << t << ",";
  }
  o << "]";
  return o;
}
const ll mod = 1e9 + 7;
const int N = 200002;
ll dp[N], nx[N];
ll suf[N] = {};
int main() {
  int a, b, k, t;
  cin >> a >> b >> k >> t;
  dp[0] = 1;
  for (int(i) = 0; (i) < (int)(t); ++(i)) {
    fill(nx, nx + N, 0);
    ll sum = 0;
    for (int(j) = 0; (j) < (int)(2 * k + 1); ++(j)) {
      (sum += dp[j]) %= mod;
      nx[j] = sum;
    }
    for (int j = 2 * k + 1; j < N; ++j) {
      sum = (sum + dp[j] - dp[j - 2 * k - 1] + mod) % mod;
      nx[j] = sum;
    }
    for (int(j) = 0; (j) < (int)(N); ++(j)) dp[j] = nx[j];
  }
  for (int i = N - 2; i >= 0; --i) suf[i] = (suf[i + 1] + dp[i]) % mod;
  ll ans = 0;
  for (int(i) = 0; (i) < (int)(N); ++(i))
    if (dp[i] > 0) {
      int x = max(0, b + i - a + 1);
      if (x >= N) continue;
      (ans += dp[i] * suf[x]) %= mod;
    }
  cout << ans << endl;
  return 0;
}
