#include <bits/stdc++.h>
using namespace std;
long long f[2][200500], g[2][200500], sf[2][200500], sg[2][200500], ans;
int a, b, k, t;
const long long MOD = 1000000007;
int main() {
  scanf("%d%d%d%d", &a, &b, &k, &t);
  f[0][a + 100210] = 1;
  g[0][b + 100210] = 1;
  for (int j = -100000; j <= 100100; j++) {
    sf[0][j + 100210] = (sf[0][j + 100209] + f[0][j + 100210]) % MOD;
    sg[0][j + 100210] = (sg[0][j + 100209] + g[0][j + 100210]) % MOD;
  }
  for (int i = 1; i <= t; i++) {
    for (int j = -100000; j <= 100100; j++) {
      f[i & 1][j + 100210] =
          (sf[(i - 1) & 1][min(100210 + a + k * i, j + k + 100210)] -
           sf[(i - 1) & 1][max(100209 + a - k * i, j - k + 100209)]) %
          MOD;
      if (f[i & 1][j + 100210] < 0) f[i & 1][j + 100210] += MOD;
      sf[i & 1][j + 100210] =
          (sf[i & 1][j + 100209] + f[i & 1][j + 100210]) % MOD;
    }
    for (int j = -100000; j <= 100100; j++) {
      g[i & 1][j + 100210] =
          (sg[(i - 1) & 1][min(100210 + b + k * i, j + k + 100210)] -
           sg[(i - 1) & 1][max(100209 + b - k * i, j - k + 100209)]) %
          MOD;
      if (g[i & 1][j + 100210] < 0) g[i & 1][j + 100210] += MOD;
      sg[i & 1][j + 100210] =
          (sg[i & 1][j + 100209] + g[i & 1][j + 100210]) % MOD;
    }
  }
  for (int j = -100000; j <= 100100; j++) {
    ans = (ans + f[t & 1][j + 100210] * sg[t & 1][j + 100209]) % MOD;
  }
  printf("%lld\n", ans);
}
