#include <bits/stdc++.h>
using namespace std;
const int T = 100 + 10;
const int KT = 2 * 1000 * 101 + 10;
const int ZR = 2 * 1000 * 101 + 10;
const int M = 1e9 + 7;
void pl(int &a, int b) {
  a += b;
  if (a >= M) a -= M;
  if (a < 0) a += M;
}
int ans[2 * KT];
int pref[2 * KT];
void CalcPref() {
  for (int j = 0; j < 2 * KT; ++j) {
    pref[j] = 0;
    if (j > 0) pl(pref[j], pref[j - 1]);
    pl(pref[j], ans[j]);
  }
}
int GetS(int l, int r) {
  l = max(l, 0);
  r = min(r, 2 * KT - 1);
  if (l > r) return 0;
  int ret = pref[r];
  if (l - 1 >= 0) pl(ret, -pref[l - 1]);
  return ret;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int a, b, k, t;
  cin >> a >> b >> k >> t;
  ans[ZR + a - b] = 1;
  for (int i = 1; i <= t; ++i) {
    CalcPref();
    int cur = 0;
    for (int j = 0; j < 2 * KT; ++j) {
      pl(cur, -GetS(j - (2 * k + 1), j - 1));
      pl(cur, GetS(j, j + 2 * k));
      ans[j] = cur;
    }
  }
  CalcPref();
  cout << GetS(ZR + 1, 2 * KT - 1) << '\n';
}
