#include <bits/stdc++.h>
using namespace std;
int dp[110][210100], sum[210100];
int a, b, k, t;
int main() {
  scanf("%d%d%d%d", &a, &b, &k, &t);
  dp[0][0] = 1;
  for (int i = 1; i <= t; i++) {
    for (int j = 0; j < 210100; j++)
      sum[j] = ((j > 0 ? sum[j - 1] : 0) + dp[i - 1][j]) % 1000000007;
    for (int j = 0; j < 210100; j++)
      dp[i][j] = (sum[j] - (j - 2 * k - 1 >= 0 ? sum[j - 2 * k - 1] : 0) +
                  1000000007) %
                 1000000007;
  }
  for (int i = 0; i < 210100; i++)
    sum[i] = ((i > 0 ? sum[i - 1] : 0) + dp[t][i]) % 1000000007;
  int ans = 0;
  for (int i = 0; i <= 2 * k * t; i++)
    (ans += (1LL) * dp[t][i] * (i + a - b - 1 < 0 ? 0 : sum[i + a - b - 1]) %
            1000000007) %= 1000000007;
  printf("%d\n", ans);
  return 0;
}
