#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int size = 200000 + 4000;
int arrMemory[2][size];
int arrLexa[2][size];
int positive_modulo(int i, int n) { return (i % n + n) % n; }
int main() {
  int a, b, k, t;
  cin >> a >> b >> k >> t;
  arrMemory[0][a + 100001] = 1;
  arrLexa[0][b + 100001] = 1;
  for (int i = 0; i < t; i++) {
    int accum = 0;
    int accum2 = 0;
    for (int j = 0; j < size; j++) {
      accum = (accum + arrMemory[0][j]) % MOD;
      arrMemory[1][j] = accum;
      accum2 = (accum2 + arrLexa[0][j]) % MOD;
      arrLexa[1][j] = accum2;
    }
    for (int j = 0; j < size; j++) {
      arrMemory[0][j] = positive_modulo(
          arrMemory[1][min(j + k, size - 1)] - arrMemory[1][max(j - k - 1, 0)],
          MOD);
      arrLexa[0][j] = positive_modulo(
          arrLexa[1][min(j + k, size - 1)] - arrLexa[1][max(j - k - 1, 0)],
          MOD);
    }
  }
  long long cnt = 0;
  int accum2 = 0;
  for (int j = 0; j < size; j++) {
    accum2 = (accum2 + arrLexa[0][j]) % MOD;
    arrLexa[1][j] = accum2;
  }
  for (int j = 1; j < size; j++) {
    long long temp = (arrMemory[0][j] % MOD);
    temp *= arrLexa[1][j - 1];
    cnt = (cnt + (temp % MOD)) % MOD;
  }
  cout << cnt;
}
