#include <bits/stdc++.h>
using namespace std;
const int MAXN = 8e5;
struct Complex {
  double x, y;
  Complex() { x = 0, y = 0; }
  Complex(double X, double Y) { x = X, y = Y; }
  Complex operator*(const double &a) const { return Complex(x * a, y * a); }
  Complex operator/(const double &a) const { return Complex(x / a, y / a); }
  Complex operator+(const Complex &a) const {
    return Complex(x + a.x, y + a.y);
  }
  Complex operator-(const Complex &a) const {
    return Complex(x - a.x, y - a.y);
  }
  Complex operator*(const Complex &a) const {
    return Complex(x * a.x - y * a.y, x * a.y + y * a.x);
  }
};
int lim, rev[MAXN + 5];
void fft(vector<Complex> &f, int op) {
  for (int i = 0; i < lim; i++)
    if (i < rev[i]) swap(f[i], f[rev[i]]);
  for (int len = 2; len <= lim; len <<= 1) {
    Complex w(cos(2 * acos(-1) / len), op * sin(2 * acos(-1) / len));
    for (int l = 0; l < lim; l += len) {
      Complex wk(1, 0);
      for (int i = l; i < l + len / 2; i++, wk = wk * w) {
        Complex t = wk * f[i + len / 2];
        f[i + len / 2] = f[i] - t;
        f[i] = f[i] + t;
      }
    }
  }
  if (op == -1)
    for (int i = 0; i < lim; i++) f[i] = f[i] / lim;
}
vector<Complex> operator*(vector<Complex> f, vector<Complex> g) {
  int n = ((int)f.size()) + ((int)g.size()) - 1;
  for (lim = 1; lim < n; lim <<= 1)
    ;
  for (int i = 0; i < lim; i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) ? lim >> 1 : 0);
  f.resize(lim);
  g.resize(lim);
  fft(f, 1);
  fft(g, 1);
  for (int i = 0; i < lim; i++) f[i] = f[i] * g[i];
  fft(f, -1);
  f.resize(n);
  return f;
}
vector<Complex> operator+(vector<Complex> f, vector<Complex> g) {
  int n = max(((int)f.size()), ((int)g.size()));
  f.resize(n);
  g.resize(n);
  for (int i = 0; i < n; i++) f[i] = f[i] + g[i];
  return f;
}
vector<Complex> operator-(vector<Complex> f, vector<Complex> g) {
  int n = max(((int)f.size()), ((int)g.size()));
  f.resize(n);
  g.resize(n);
  for (int i = 0; i < n; i++) f[i] = f[i] - g[i];
  while (fabs(f.back().x) < 1e-8) f.pop_back();
  return f;
}
vector<Complex> operator*(vector<Complex> f, double p) {
  for (int i = 0; i < ((int)f.size()); i++) f[i] = f[i] * p;
  return f;
}
vector<Complex> operator/(vector<Complex> f, double p) {
  for (int i = 0; i < ((int)f.size()); i++) f[i] = f[i] / p;
  return f;
}
int n, m, k;
char S[MAXN + 5], T[MAXN + 5];
int tmp[MAXN + 5];
int chk(char s) { return s == 'A' ? 0 : (s == 'G' ? 1 : (s == 'C' ? 2 : 3)); }
vector<Complex> f, g, h;
int main() {
  scanf("%d %d %d", &n, &m, &k);
  f.resize(n);
  g.resize(m);
  scanf("%s", S);
  scanf("%s", T);
  for (int i = 0; i < 4; i++) {
    memset(tmp, 0, sizeof(tmp));
    for (int j = 0, lt = 0; j < n; j++, lt--) {
      if (chk(S[j]) == i) lt = k + 1;
      tmp[j] |= lt > 0;
    }
    for (int j = n - 1, lt = 0; j >= 0; j--, lt--) {
      if (chk(S[j]) == i) lt = k + 1;
      tmp[j] |= lt > 0;
    }
    reverse(tmp, tmp + n);
    for (int j = 0; j < n; j++) f[j].x = tmp[j];
    for (int j = 0; j < m; j++) g[j].x = chk(T[j]) == i;
    h = h + (f * g);
  }
  int Ans = 0;
  for (int i = 0; i < ((int)h.size()); i++)
    if (int(h[i].x + 0.49) == m) Ans++;
  printf("%d\n", Ans);
  return 0;
}
