#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  register long long x = 0;
  char zf = 1;
  char ch;
  while (ch != '-' && !isdigit(ch)) ch = getchar();
  if (ch == '-') zf = -1, ch = getchar();
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return x * zf;
}
void write(long long y) {
  if (y < 0) putchar('-'), y = -y;
  if (y > 9) write(y / 10);
  putchar(y % 10 + '0');
}
inline void writeln(const long long y) {
  write(y);
  putchar('\n');
}
inline int min(const int x, const int y) { return x < y ? x : y; }
inline int max(const int x, const int y) { return x > y ? x : y; }
inline int gcd(const int x, const int y) { return (!y) ? x : gcd(y, x % y); }
inline int lcm(const int x, const int y) { return x * y / gcd(x, y); }
inline long long ksm(long long x, long long y) {
  if (!y) return 1;
  long long ew = 1;
  while (y > 1) {
    if (y & 1)
      y--, ew = ew * x % 1000000007;
    else
      y >>= 1, x = x * x % 1000000007;
  }
  return x * ew % 1000000007;
}
int i, j, k, m, n, x, y, z, cnt;
int a, b;
long long f[2][1000010], qz[2][1000010];
int main() {
  a = read();
  b = read();
  k = read();
  int t = read();
  int MIN = a - b - k * t * 2, MAX = a - b + k * t * 2;
  long long ret = 0;
  f[0][a - b + 500000] = 1;
  for (register int i = a - b + 500000; i <= 1000000; i++) qz[0][i] = 1;
  for (register int i = 1; i <= t; i++) {
    for (register int j = MIN; j <= MAX; j++) {
      if (j > a - b) {
        f[i & 1][j + 500000] = f[i & 1][a - b + a - b - j + 500000];
      } else {
        f[i & 1][j + 500000] = f[i & 1][j + 500000 - 1];
        f[i & 1][j + 500000] -= (qz[i - 1 & 1][j + 500000 - 1] -
                                 qz[i - 1 & 1][j + 500000 - 2 * k - 2]);
        f[i & 1][j + 500000] +=
            (qz[i - 1 & 1][j + 500000 + 2 * k] - qz[i - 1 & 1][j + 500000 - 1]);
        f[i & 1][j + 500000] %= 1000000007;
        (f[i & 1][j + 500000] += 1000000007) %= 1000000007;
      }
      qz[i & 1][j + 500000] = qz[i & 1][j + 500000 - 1] + f[i & 1][j + 500000];
    }
  }
  for (register int i = 500001; i <= 1000000; i++)
    ret = (ret + f[t & 1][i]) % 1000000007;
  cout << ret;
  return 0;
}
