#include <bits/stdc++.h>
using namespace std;
char s[200002], t[200002];
struct FFT {
  const static int LOGN = 19;
  const static int MAXN = 1 << LOGN;
  const double PI = acos(-1);
  int lg2(int n) { return 32 - __builtin_clz(n - 1); }
  int rev[MAXN];
  complex<double> rt[MAXN];
  void precalc() {
    rt[1] = complex<double>{1, 0};
    for (int k = 2; k < MAXN; k *= 2) {
      complex<double> z[] = {1, polar(1.0, PI / k)};
      for (int i = k; i < 2 * k; i++) rt[i] = rt[i / 2] * z[i & 1];
    }
  }
  void fft(complex<double> *a, int n) {
    for (int i = 0; i < n; i++) rev[i] = (rev[i / 2] | (i & 1) << lg2(n)) / 2;
    for (int i = 0; i < n; i++)
      if (i < rev[i]) swap(a[i], a[rev[i]]);
    for (int k = 1; k < n; k *= 2)
      for (int i = 0; i < n; i += 2 * k)
        for (int j = 0; j < k; j++) {
          auto x = (double *)&rt[j + k], y = (double *)&a[i + j + k];
          complex<double> z(x[0] * y[0] - x[1] * y[1],
                            x[0] * y[1] + x[1] * y[0]);
          a[i + j + k] = a[i + j] - z;
          a[i + j] += z;
        }
  }
  complex<double> X[MAXN], Y[MAXN];
  vector<double> multiply(const vector<double> &a, const vector<double> &b) {
    fill(X, X + MAXN, complex<double>{0, 0}),
        fill(Y, Y + MAXN, complex<double>{0, 0});
    if (a.empty() || b.empty()) return {};
    int sz = a.size() + b.size() - 1, n = 1 << lg2(sz);
    vector<double> res(sz);
    copy(a.begin(), a.end(), X);
    for (int i = 0; i < b.size(); i++) X[i].imag(b[i]);
    fft(X, n);
    for (int i = 0; i < n; i++) X[i] *= X[i];
    for (int i = 0; i < n; i++) Y[i] = X[(n - i) & (n - 1)] - conj(X[i]);
    fft(Y, n);
    for (int i = 0; i < sz; i++) res[i] = Y[i].imag() / (4 * n);
    return res;
  }
} fft;
vector<int> ans;
char c[4] = {'A', 'T', 'C', 'G'};
int sum[200002];
int main() {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  scanf("%s%s", s, t);
  fft.precalc();
  ans.resize(n);
  for (int j = 0; j < 4; j++) {
    vector<double> a, b;
    a.resize(n), b.resize(m);
    memset(sum, 0, sizeof(sum));
    for (int i = 0; i < n; i++) {
      if (s[i] == c[j]) {
        sum[max(0, i - k)]++;
        sum[min(n, i + k + 1)]--;
      }
    }
    int cnt = 0;
    for (int i = 0; i < n; i++) {
      cnt += sum[i];
      if (cnt > 0) a[i] = 1;
    }
    for (int i = 0; i < m; i++) {
      if (t[i] == c[j]) b[m - i - 1] = 1;
    }
    vector<double> res = fft.multiply(a, b);
    for (int i = m - 1; i < n + m - 1; i++) {
      ans[i - (m - 1)] += round(res[i]);
    }
  }
  int ans2 = 0;
  for (int i = 0; i < n; i++) {
    if (ans[i] == m) ans2++;
  }
  printf("%d\n", ans2);
}
