#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int N = 2 * 1000 * 110;
int f[N], g[N];
int main() {
  int a, b, K, t;
  scanf("%d%d%d%d", &a, &b, &K, &t);
  f[0] = 1;
  for (int i = 1; i <= t; i++) {
    int tmp = 0;
    int L = 2 * K * i, R = L - 2 * K;
    for (int j = L; j >= R; j--) tmp = (tmp + f[j]) % MOD;
    for (int j = 2 * K * i; j >= 0; j--) {
      int t = f[j];
      f[j] = tmp;
      tmp = (tmp - t) % MOD;
      if (R > 0) {
        tmp = (tmp + f[--R]) % MOD;
      }
    }
  }
  int L = 2 * K * t, ans = 0;
  for (int i = L; i >= 0; i--) g[i] = (f[i] + g[i + 1]) % MOD;
  for (int i = 0; i <= L; i++) {
    int t = max(i + b - a + 1, 0);
    ans = (ans + 1ll * f[i] * g[t]) % MOD;
  }
  printf("%d\n", (ans + MOD) % MOD);
  return 0;
}
