#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5;
const int maxm = 3e5 + 5;
const int DFT = 1;
const int IDFT = -1;
const double PI = acos(-1);
const double eps = 1e-7;
struct Complex {
  double real, imag;
  Complex(double r = 0, double i = 0) {
    this->real = r;
    this->imag = i;
  }
};
Complex operator+(const Complex &a, const Complex &b) {
  return Complex(a.real + b.real, a.imag + b.imag);
}
Complex operator-(const Complex &a, const Complex &b) {
  return Complex(a.real - b.real, a.imag - b.imag);
}
Complex operator*(const Complex &a, const Complex &b) {
  return Complex(a.real * b.real - a.imag * b.imag,
                 a.real * b.imag + a.imag * b.real);
}
int rev[maxn];
void FFT(Complex *a, int len, int opt) {
  for (int i = 0; i < len; i++)
    if (i < rev[i]) swap(a[i], a[rev[i]]);
  for (int i = 1; i < len; i <<= 1) {
    Complex wn = Complex(cos(PI / i), opt * sin(PI / i));
    int step = i << 1;
    for (int j = 0; j < len; j += step) {
      Complex w = Complex(1, 0);
      for (int k = 0; k < i; k++, w = w * wn) {
        Complex x = a[j + k];
        Complex y = w * a[j + k + i];
        a[j + k] = x + y;
        a[j + k + i] = x - y;
      }
    }
  }
  if (opt == -1)
    for (int i = 0; i < len; i++) a[i].real = a[i].real / len;
}
char s[maxm];
char t[maxm];
Complex f[maxn];
Complex g[maxn];
int cnt[maxm];
int cf[maxn];
int cg[maxn];
void solve(int n, int m, int k, char opt, int bln) {
  for (int i = 0; i < bln; i++) cf[i] = cg[i] = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == opt) {
      int l = max(0, i - k);
      int r = min(n, i + k + 1);
      cf[l]++;
      cf[r]--;
    }
  }
  for (int i = 1; i < n; i++) cf[i] += cf[i - 1];
  for (int i = 0; i < n; i++)
    if (cf[i]) cf[i] = 1;
  for (int i = n; i < bln; i++) cf[i] = 0;
  for (int i = 0; i < m; i++) cg[i] = (t[i] == opt);
  for (int i = m; i < bln; i++) cg[i] = 0;
  for (int i = 0; i < bln; i++) f[i] = Complex(cf[i], 0);
  for (int i = 0; i < bln; i++) g[i] = Complex(cg[i], 0);
  FFT(f, bln, DFT);
  FFT(g, bln, DFT);
  for (int i = 0; i < bln; i++) f[i] = f[i] * g[i];
  FFT(f, bln, IDFT);
  for (int i = 0; i <= n - 1; i++) cnt[i] += (int)(f[i].real + 0.5);
}
int main(void) {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  scanf("%s", s);
  scanf("%s", t);
  reverse(t, t + m);
  int bln = 1, bct = 0;
  while (bln < (n + m + 2)) bln <<= 1, bct++;
  for (int i = 0; i < bln; i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (bct - 1));
  solve(n, m, k, 'A', bln);
  solve(n, m, k, 'T', bln);
  solve(n, m, k, 'C', bln);
  solve(n, m, k, 'G', bln);
  int res = 0;
  for (int i = 0; i <= n - 1; i++) res += (cnt[i] == m);
  printf("%d\n", res);
  return 0;
}
