#include <bits/stdc++.h>
using namespace std;
const double tau = acos(0.) * 4;
void fft(vector<complex<double> > &vec, const int &sz) {
  for (int i = 1, j = 0; i < sz; ++i) {
    int bit = sz >> 1;
    while (j >= bit) {
      j -= bit;
      bit >>= 1;
    }
    j += bit;
    if (i < j) swap(vec[i], vec[j]);
  }
  for (int len = 2; len <= sz; len <<= 1) {
    complex<double> add = complex<double>(cos(tau / len), sin(tau / len));
    for (int i = 0; i < sz; i += len) {
      complex<double> cur = complex<double>(1, 0);
      for (int j = 0; j < len / 2; ++j) {
        complex<double> v1 = vec[i + j];
        complex<double> v2 = vec[i + j + len / 2] * cur;
        vec[i + j] = v1 + v2;
        vec[i + j + len / 2] = v1 - v2;
        cur *= add;
      }
    }
  }
}
void ifft(vector<complex<double> > &vec, const int &sz) {
  for (int i = 1, j = 0; i < sz; ++i) {
    int bit = sz >> 1;
    while (j >= bit) {
      j -= bit;
      bit >>= 1;
    }
    j += bit;
    if (i < j) swap(vec[i], vec[j]);
  }
  for (int len = 2; len <= sz; len <<= 1) {
    complex<double> add = complex<double>(cos(tau / len), -sin(tau / len));
    for (int i = 0; i < sz; i += len) {
      complex<double> cur = complex<double>(1, 0);
      for (int j = 0; j < len / 2; ++j) {
        complex<double> v1 = vec[i + j];
        complex<double> v2 = vec[i + j + len / 2] * cur;
        vec[i + j] = v1 + v2;
        vec[i + j + len / 2] = v1 - v2;
        cur *= add;
      }
    }
  }
  for (int i = 0; i < sz; ++i) vec[i] /= sz;
}
inline void polynomialMul(vector<int> &a, vector<int> &b,
                          vector<complex<double> > &c) {
  vector<complex<double> > aa, bb;
  int sz = (int)a.size();
  int tmp = 1;
  while (tmp < sz) tmp <<= 1;
  a.resize(tmp);
  b.resize(tmp);
  aa.resize(tmp);
  bb.resize(tmp);
  c.resize(tmp);
  for (int i = 0; i < tmp; ++i) aa[i] = a[i], bb[i] = b[i];
  fft(aa, tmp);
  fft(bb, tmp);
  for (int i = 0; i < tmp; ++i) c[i] = aa[i] * bb[i];
  ifft(c, tmp);
}
int acc[200001];
int sum[200000];
int main() {
  char s[200000];
  char t[200000];
  const char ch[] = "ATGC";
  int n, m, k, ans = 0;
  scanf("%d%d%d%s%s", &n, &m, &k, s, t);
  reverse(t, t + m);
  for (int j = 0; j < 4; ++j) {
    vector<complex<double> > c;
    vector<int> a, b;
    int tmp = 0;
    for (int i = 0; i < n; ++i) {
      if (s[i] != ch[j]) continue;
      ++acc[max(i - k, 0)];
      --acc[min(i + k + 1, n)];
    }
    for (int i = 0; i < n; ++i) {
      tmp += acc[i];
      if (tmp)
        a.emplace_back(1);
      else
        a.emplace_back(0);
    }
    for (int i = 0; i < m; ++i)
      if (t[i] == ch[j])
        b.emplace_back(1);
      else
        b.emplace_back(0);
    polynomialMul(a, b, c);
    for (int i = 0; i < n; ++i) sum[i] += (int)(c[i].real() + 0.5);
    memset(acc, 0, sizeof acc);
  }
  for (int i = m - 1; i < n; ++i)
    if (sum[i] == m) ++ans;
  printf("%d\n", ans);
  return 0;
}
