#include <bits/stdc++.h>
using namespace std;
const int maxt = 100 + 10, maxk = 1000 + 10, mx = maxt * maxk * 4 + 500,
          add = 200000, mo = 1000000007;
int f[2][mx + 10];
int i, j, k, l, r, t, n, m, a, b, ans, now;
int main() {
  scanf("%d%d%d%d", &a, &b, &k, &t);
  f[now][a - b + add] = 1;
  f[now][a - b + add + 1] = mo - 1;
  for (i = 1; i <= 2 * t; i++) {
    l = 0;
    for (j = 0; j <= mx; j++) {
      l = (l + f[now][j]) % mo;
      f[now][j] = 0;
      (f[1 - now][max(j - k, 0)] += l) %= mo;
      (f[1 - now][min(j + k + 1, mx)] -= l) %= mo;
      (f[1 - now][min(j + k + 1, mx)] += mo) %= mo;
    }
    now = 1 - now;
  }
  l = 0;
  for (j = 0; j <= mx; j++) {
    (l += f[now][j]) %= mo;
    if (j > add) (ans += l) %= mo;
  }
  (ans += mo) %= mo;
  printf("%d\n", ans);
}
