#include <bits/stdc++.h>
using namespace std;
long long dp[105][250000], sum[250000];
int main() {
  int a, b, k, t;
  cin >> a >> b >> k >> t;
  dp[0][0] = 1;
  for (int i = 1; i <= t; i++) {
    for (int j = 0; j < 250000; j++)
      sum[j] = ((j - 1 >= 0 ? sum[j - 1] : 0) + dp[i - 1][j]) % 1000000007;
    for (int j = 0; j < 250000; j++)
      dp[i][j] = (sum[j] - (j - 2 * k - 1 >= 0 ? sum[j - 2 * k - 1] : 0) +
                  1000000007) %
                 1000000007;
  }
  for (int j = 0; j < 250000; j++)
    sum[j] = ((j > 0 ? sum[j - 1] : 0) + dp[t][j]) % 1000000007;
  long long ans = 0;
  for (int i = 0; i <= 2 * k * t; i++)
    ans += (1LL * dp[t][i] * (i + a - b - 1 >= 0 ? sum[i + a - b - 1] : 0)) %
           1000000007,
        ans %= 1000000007;
  cout << ans << endl;
}
