#include <bits/stdc++.h>
using namespace std;
struct A {
  int a[500000];
  int& operator[](const int x) { return a[x + 250000]; }
} f[2];
int a, b, k, t, m;
int main() {
  scanf("%d%d%d%d", &a, &b, &k, &t);
  m = 2 * k * t + 200;
  f[0][a - b] = 1;
  for (int i = 1; i <= t << 1; ++i) {
    long long sum = 0;
    for (int j = -m - k - 1; j <= -m + k - 1; ++j)
      sum = (sum + f[(i & 1) ^ 1][j]) % 1000000007;
    for (int j = -m; j <= m; ++j) {
      sum = (sum - f[(i & 1) ^ 1][j - k - 1] + f[(i & 1) ^ 1][j + k]) %
            1000000007;
      f[i & 1][j] = sum;
    }
  }
  long long ans = 0;
  for (int i = 1; i <= m; ++i) ans = (ans + f[(t << 1) & 1][i]) % 1000000007;
  printf("%lld\n", (ans + 1000000007) % 1000000007);
  return 0;
}
