#include <bits/stdc++.h>
using namespace std;
void scanint(int& x) {
  int c = getchar_unlocked();
  x = 0;
  while (((c < 48 || c > 57))) c = getchar_unlocked();
  for (; c > 47 && c < 58; c = getchar_unlocked()) {
    x = (x << 1) + (x << 3) + c - 48;
  }
}
struct cpx {
  double a, b;
  cpx() : a(0), b(0){};
  cpx(double a_, double b_) : a(a_), b(b_) {}
  cpx operator+(const cpx& other) const {
    return cpx(a + other.a, b + other.b);
  }
  cpx operator-(const cpx& other) const {
    return cpx(a - other.a, b - other.b);
  }
  cpx& operator*=(const cpx& other) {
    double x = a;
    a = x * other.a - b * other.b;
    b = x * other.b + b * other.a;
    return *this;
  }
  cpx operator*(const cpx& other) const { return cpx(a, b) *= other; }
};
const double PI = M_PI;
const int N = (1 << 19) + 400;
int rev[N];
cpx Wpow[N];
inline unsigned int odwroc(unsigned val, int logn) {
  unsigned mask = 0x0000FFFF;
  val = ((val & mask) << 16) | ((val >> 16) & mask);
  mask = 0x00FF00FF;
  val = ((val & mask) << 8) | ((val >> 8) & mask);
  mask = 0x0F0F0F0F;
  val = ((val & mask) << 4) | ((val >> 4) & mask);
  mask = 0x33333333;
  val = ((val & mask) << 2) | ((val >> 2) & mask);
  mask = 0x55555555;
  val = ((val & mask) << 1) | ((val >> 1) & mask);
  return (val >> (32 - logn));
}
void FFT(vector<cpx>& A, bool invert) {
  int n = (int)A.size();
  for (int i = 0; i < n; i++)
    if (i < rev[i]) swap(A[i], A[rev[i]]);
  for (int len = 2; len <= n; len <<= 1) {
    double alpha = 2 * PI / len * (invert ? -1 : 1);
    cpx Wn(cos(alpha), sin(alpha));
    Wpow[0] = {1, 0};
    for (int i = 1; i < len / 2; i++) Wpow[i] = Wpow[i - 1] * Wn;
    for (int i = 0; i < n; i += len) {
      for (int j = 0; j < len / 2; j++) {
        cpx u = A[i + j], v = A[i + j + len / 2] * Wpow[j];
        A[i + j] = u + v;
        A[i + j + len / 2] = u - v;
      }
    }
  }
  if (invert == true)
    for (int i = 0; i < n; i++) A[i] *= cpx{1.0 / n, 0};
}
vector<cpx> PolynomialMultiplication(vector<cpx>& A, vector<cpx>& B) {
  int nSize = 1;
  while (nSize < max((int)A.size(), (int)B.size())) nSize <<= 1;
  nSize <<= 1;
  while ((int)A.size() < nSize) A.push_back({0, 0});
  while ((int)B.size() < nSize) B.push_back({0, 0});
  int logn = 0;
  while ((1 << logn) < nSize) logn++;
  for (int i = 0; i < nSize; i++) rev[i] = odwroc(i, logn);
  FFT(A, false);
  FFT(B, false);
  vector<cpx> C(nSize, {0, 0});
  for (int i = 0; i < nSize; i++) C[i] = A[i] * B[i];
  FFT(C, true);
  return C;
}
int n, m, k, match[N], pref[N];
char S[N], T[N];
void solve(char znak) {
  for (int i = 0; i < n; i++) {
    if (S[i] == znak) {
      pref[max(0, i - k)]++;
      if (i + k + 1 < n) pref[i + k + 1]--;
    }
  }
  for (int i = 1; i < n; i++) pref[i] += pref[i - 1];
  int nSize = 1;
  while (nSize < max(n, m)) nSize <<= 1;
  nSize <<= 1;
  vector<cpx> A, B;
  A.reserve(nSize), B.reserve(nSize);
  for (int i = 0; i < n; i++) A.push_back(cpx(pref[i] > 0, 0)), pref[i] = 0;
  for (int i = 0; i < m; i++) B.push_back(cpx(T[i] == znak, 0));
  reverse(B.begin(), B.end());
  vector<cpx> C = PolynomialMultiplication(A, B);
  for (int i = 0; i < n; i++) match[i] += (int)(C[i + m - 1].a + 0.5);
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  scanf("%s", S);
  scanf("%s", T);
  solve('A');
  solve('C');
  solve('T');
  solve('G');
  int wynik = 0;
  for (int i = 0; i < n; i++)
    if (match[i] == m) wynik++;
  printf("%d\n", wynik);
  getchar();
  getchar();
  return 0;
}
