#include <bits/stdc++.h>
using namespace std;
const int N = 2000000, add = 600000, mod = 1000000000 + 7;
int now[N], nxt[N];
int a, b, k, t;
int main() {
  cin >> a >> b >> k >> t;
  int start = a - b;
  t <<= 1;
  now[start + add] = 1;
  for (int i = 1; i <= t; ++i) {
    for (int j = start - i * k; j <= start + i * k; ++j) {
      nxt[j - k + add] += now[j + add];
      if (nxt[j - k + add] >= mod) nxt[j - k + add] -= mod;
      nxt[j + k + add + 1] += mod - now[j + add];
      if (nxt[j + k + add + 1] >= mod) nxt[j + k + add + 1] -= mod;
    }
    int ss = 0;
    for (int j = start - (i + 1) * k; j <= start + (i + 1) * k; ++j) {
      ss += nxt[j + add];
      if (ss >= mod) ss -= mod;
      now[j + add] = ss;
      nxt[j + add] = 0;
    }
  }
  int ans = 0;
  for (int i = 1; i <= start + t * k; ++i) {
    ans += now[i + add];
    if (ans >= mod) ans -= mod;
  }
  cout << ans;
  return 0;
}
