#include <bits/stdc++.h>
using namespace std;
map<pair<int, int>, int> MM;
long long dp(int A, int B, int K, int T) {
  if (T == 0) {
    if (A > B) {
      MM[make_pair(A, B)]++;
    }
    return A > B;
  }
  long long r = 0;
  for (int i = -K; i <= K; ++i) {
    for (int j = -K; j <= K; ++j) r += dp(A + i, B + j, K, T - 1);
  }
  return r % 1000000007;
}
int main() {
  int A, B, K, T;
  cin >> A >> B >> K >> T;
  vector<long long> W(2 * K * T + 1);
  W[T * K] = 1;
  for (int i = 0; i < T; ++i) {
    vector<long long> D(2 * K * T + 1);
    for (int j = 0; j < W.size(); ++j) {
      int st = j - K, en = j + K;
      if (st < 0) st = 0;
      D[st] += W[j];
      if (en + 1 >= W.size()) continue;
      D[en + 1] -= W[j];
    }
    long long s = 0;
    for (int j = 0; j < W.size(); ++j) {
      s += D[j];
      s %= 1000000007;
      if (s < 0) s += 1000000007;
      W[j] = s;
      if (s < 0) {
        assert(false);
      }
    }
  }
  vector<long long> AW(W.size());
  for (int i = 0; i < W.size(); ++i) {
    AW[i] = W[i];
    if (i > 0) AW[i] += AW[i - 1];
    AW[i] %= 1000000007;
    if (AW[i] < 0) {
      assert(false);
    }
  }
  int d = A - B;
  long long S = 0;
  for (int i = 0; i < W.size(); ++i) {
    int j = i + d - 1;
    if (j < 0) continue;
    if (j >= W.size()) j = W.size() - 1;
    S += (W[i] * AW[j]) % 1000000007;
  }
  S %= 1000000007;
  cout << S << endl;
}
