#include <bits/stdc++.h>
int main() {
  int a, b, k, t;
  long long ta[2][200300] = {};
  long long tb[2][200300] = {};
  long long w, r(0);
  std::scanf("%d%d%d%d", &a, &b, &k, &t);
  ta[0][(200300 / 2) + a] = tb[0][(200300 / 2) + b] = 1;
  for (int h(0); h < t; ++h) {
    std::memset(ta[h & 1 ^ 1], 0, sizeof(ta[0]));
    for (int i((200300 / 2) + a - h * k); i <= (200300 / 2) + a + h * k; ++i) {
      ta[h & 1 ^ 1][i - k] += ta[h & 1][i];
      ta[h & 1 ^ 1][i + k + 1] -= ta[h & 1][i];
    }
    for (int i((200300 / 2) + a - (h + 1) * k + 1);
         i <= (200300 / 2) + a + (h + 1) * k + 1; ++i)
      ta[h & 1 ^ 1][i] += ta[h & 1 ^ 1][i - 1];
    for (int i((200300 / 2) + a - (h + 1) * k);
         i <= (200300 / 2) + a + (h + 1) * k; ++i)
      ta[h & 1 ^ 1][i] %= 1000000007;
  }
  for (int h(0); h < t; ++h) {
    std::memset(tb[h & 1 ^ 1], 0, sizeof(tb[0]));
    for (int i((200300 / 2) + b - h * k); i <= (200300 / 2) + b + h * k; ++i) {
      tb[h & 1 ^ 1][i - k] += tb[h & 1][i];
      tb[h & 1 ^ 1][i + k + 1] -= tb[h & 1][i];
    }
    for (int i((200300 / 2) + b - (h + 1) * k + 1);
         i <= (200300 / 2) + b + (h + 1) * k + 1; ++i)
      tb[h & 1 ^ 1][i] += tb[h & 1 ^ 1][i - 1];
    for (int i((200300 / 2) + b - (h + 1) * k);
         i <= (200300 / 2) + b + (h + 1) * k; ++i)
      tb[h & 1 ^ 1][i] %= 1000000007;
  }
  for (int i(1); i < 200300; ++i) {
    ta[t & 1][i] += ta[t & 1][i - 1];
    if (1000000007 <= ta[t & 1][i]) ta[t & 1][i] -= 1000000007;
  }
  for (int i(0); i < 200300; ++i) {
    w = tb[t & 1][i] * (1000000007 + ta[t & 1][200300 - 1] - ta[t & 1][i]) %
        1000000007;
    r += w;
    if (1000000007 <= r) r -= 1000000007;
  }
  std::printf("%d\n", (int)r);
  return 0;
}
