#include <bits/stdc++.h>
using namespace std;
long long int dp1[200200 + 5], dp2[200200 + 5], dp[200200 + 5];
int main() {
  long long int i, j, l, m, n, sum, ans;
  long long int a, b, k, t;
  scanf("%lld %lld %lld %lld", &a, &b, &k, &t);
  dp1[a] = 1;
  for (i = 1; i <= t; i++) {
    sum = 0;
    for (j = 1; j <= 200200; j++) {
      sum = (sum + dp1[j]) % 1000000007;
      dp[j] = sum;
      if ((j - 2 * k) >= 1) sum = (sum - dp1[j - 2 * k]) % 1000000007;
    }
    for (j = 1; j <= 200200; j++) dp1[j] = dp[j];
  }
  dp2[b] = 1;
  for (i = 1; i <= t; i++) {
    sum = 0;
    for (j = 1; j <= 200200; j++) {
      sum = (sum + dp2[j]) % 1000000007;
      dp[j] = sum;
      if ((j - 2 * k) >= 1) sum = (sum - dp2[j - 2 * k]) % 1000000007;
    }
    for (j = 1; j <= 200200; j++) dp2[j] = dp[j];
  }
  sum = dp2[0];
  ans = 0;
  for (i = 1; i <= 200200; i++) {
    ans = (ans + sum * dp1[i]) % 1000000007;
    sum = (sum + dp2[i]) % 1000000007;
  }
  printf("%lld\n", ((ans % 1000000007) + 1000000007) % 1000000007);
  return 0;
}
