#include <bits/stdc++.h>
const int base = 300000;
const int modulo = 1000000007;
int dp[2][600000];
int delta1[600000];
int delta2[600000];
int a, b, k, t;
inline long long power(long long a, long long b) {
  long long answer;
  for (answer = 1; b; (b >>= 1), (a *= a) %= modulo)
    if (b & 1) (answer *= a) %= modulo;
  return answer;
}
int main(void) {
  int x, y, z;
  int i, j;
  int q;
  int answer;
  scanf("%d %d %d %d", &a, &b, &k, &t);
  answer = 0;
  z = 0;
  dp[z][base + a - b] = 1;
  z ^= 1;
  for (i = 0; i <= t; ++i) {
    q = 0;
    memset(delta1, 0, sizeof(delta1));
    memset(delta2, 0, sizeof(delta2));
    memset(dp[z], 0, sizeof(dp[z]));
    for (j = base - i * 2 * k - 111; j <= base + i * 2 * k + 111; ++j) {
      x = j;
      if (x + 2 * k * (t - i) < base) continue;
      if (x - 2 * k * (t - i) > base) {
        answer += power(2 * k + 1, 2 * (t - i)) * dp[z ^ 1][x] % modulo;
        answer %= modulo;
        continue;
      }
      if (!dp[z ^ 1][x]) continue;
      delta1[x - 2 * k] += 1ll * dp[z ^ 1][x] % modulo;
      delta1[x + 1] -= 2ll * dp[z ^ 1][x] % modulo;
      delta1[x + 2 * k + 2] += 1ll * dp[z ^ 1][x] % modulo;
      delta1[x - 2 * k] %= modulo;
      (delta1[x + 1] += modulo) %= modulo;
      delta1[x + 2 * k + 2] %= modulo;
    }
    for (j = base - (i + 1) * 2 * k - 111; j <= base + (i + 1) * 2 * k + 111;
         ++j)
      (delta2[j] = delta2[j - 1] + delta1[j]) %= modulo;
    for (j = base - (i + 1) * 2 * k - 111; j <= base + (i + 1) * 2 * k + 111;
         ++j)
      (dp[z][j] = dp[z][j - 1] + delta2[j]) %= modulo;
    z ^= 1;
  }
  printf("%d\n", answer);
  return 0;
}
