#include <bits/stdc++.h>
using namespace std;
const int Mod = (int)1e9 + 7;
long long dp[2][200005];
long long sum[200005];
int main() {
  int a, b, t, K;
  scanf("%d%d%d%d", &a, &b, &K, &t);
  int cur = 0;
  dp[0][100000] = 1;
  for (int s = (1), _t = (t); s <= _t; ++s) {
    cur ^= 1;
    memset(dp[cur], 0, sizeof(dp[cur]));
    for (int i = (1), _t = (200000); i <= _t; ++i)
      sum[i] = (sum[i - 1] + dp[!cur][i]) % Mod;
    for (int i = (0), _t = (200000); i <= _t; ++i) {
      dp[cur][i] = (sum[min(200000, i + K)] - sum[max(0, i - K - 1)]) % Mod;
    }
  }
  long long res = 0;
  for (int i = (0), _t = (200000); i <= _t; ++i)
    sum[i] = (sum[i - 1] + dp[cur][i]) % Mod;
  for (int i = (0), _t = (200000); i <= _t; ++i) {
    if (a + i - b > 0)
      res = (res + dp[cur][i] * sum[min(200000, a + i - b - 1)]) % Mod;
  }
  printf("%lld\n", (res + Mod) % Mod);
  return 0;
}
