#include <bits/stdc++.h>
using namespace std;
const int _ = 8e5 + 5;
const double Pi = acos(-1);
struct Complex {
  double rl, im;
  Complex() { rl = im = 0; }
  Complex(double a, double b) { rl = a, im = b; }
  Complex operator+(Complex b) { return Complex(rl + b.rl, im + b.im); }
  Complex operator-(Complex b) { return Complex(rl - b.rl, im - b.im); }
  Complex operator*(Complex b) {
    return Complex(rl * b.rl - im * b.im, rl * b.im + im * b.rl);
  }
} w[_], a[_], b[_];
int N, n, m, k, rev[_], l, tmp[_], ans[_], Ans;
char s[_], t[_], fg[4] = {'A', 'G', 'C', 'T'};
void FFT(Complex *P, int opt) {
  for (int i = 0; i < N; ++i)
    if (i < rev[i]) swap(P[i], P[rev[i]]);
  for (int i = 1; i < N; i <<= 1)
    for (int p = i << 1, j = 0; j < N; j += p)
      for (int k = 0; k < i; ++k) {
        Complex W = w[N / i * k];
        W.im *= opt;
        Complex X = P[j + k], Y = W * P[j + k + i];
        P[j + k] = X + Y;
        P[j + k + i] = X - Y;
      }
  if (opt == -1)
    for (int i = 0; i < N; ++i) P[i].rl /= N;
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  scanf("%s%s", s, t);
  reverse(t, t + m);
  for (N = 1; N < n + m; N <<= 1) ++l;
  --l;
  for (int i = 0; i < N; ++i) rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << l);
  for (int i = 0; i < N; ++i) w[i] = Complex(cos(Pi * i / N), sin(Pi * i / N));
  for (int zsy = 0; zsy < 4; ++zsy) {
    for (int i = 0; i < N; ++i) a[i].rl = a[i].im = b[i].rl = b[i].im = 0;
    for (int i = 0, pos = -1e9; i < n; ++i) {
      if (s[i] == fg[zsy]) pos = i;
      if (pos >= i - k) a[i].rl = 1;
    }
    for (int i = n - 1, pos = 1e9; ~i; --i) {
      if (s[i] == fg[zsy]) pos = i;
      if (pos <= i + k) a[i].rl = 1;
    }
    for (int i = 0; i < m; ++i)
      if (t[i] == fg[zsy]) b[i].rl = 1;
    FFT(a, 1);
    FFT(b, 1);
    for (int i = 0; i < N; ++i) a[i] = a[i] * b[i];
    FFT(a, -1);
    for (int i = 0; i < n; ++i) ans[i] += (int)(a[i].rl + 0.5);
  }
  for (int i = 0; i < n; ++i)
    if (ans[i] == m) ++Ans;
  printf("%d\n", Ans);
  return 0;
}
