#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000007;
long long dp1[2000006];
long long dp2[2000006];
long long cum1[2000006];
long long cum2[2000006];
int main() {
  int a, b, k, t;
  cin >> a >> b >> k >> t;
  dp1[a] = 1;
  dp2[b] = 1;
  cum1[0] = dp1[0];
  cum2[0] = dp2[0];
  for (int i = 1; i <= 200405; i++) {
    cum1[i] = dp1[i] + cum1[i - 1];
    cum2[i] = dp2[i] + cum2[i - 1];
  }
  for (int tt = 1; tt <= t; tt++) {
    for (int i = 0; i <= 200405; i++) {
      if (i - 2 * k - 1 < 0) {
        dp1[i] = cum1[i];
        dp2[i] = cum2[i];
      } else {
        dp1[i] = (cum1[i] - cum1[i - 2 * k - 1] + 2 * MOD) % MOD;
        dp2[i] = (cum2[i] - cum2[i - 2 * k - 1] + 2 * MOD) % MOD;
      }
    }
    cum1[0] = dp1[0];
    cum2[0] = dp2[0];
    for (int i = 1; i <= 200405; i++) {
      cum1[i] = (dp1[i] + cum1[i - 1]) % MOD;
      cum2[i] = (dp2[i] + cum2[i - 1]) % MOD;
    }
  }
  long long ans = 0;
  for (int i = 1; i <= 200405; i++) {
    ans = (ans + (dp1[i] * cum2[i - 1]) % MOD) % MOD;
  }
  cout << ans;
  return 0;
}
