#include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1);
vector<complex<double> > fft(const vector<complex<double> >& as) {
  int n = (int)as.size();
  int k = 0;
  while ((1 << k) < n) k++;
  vector<int> r(n);
  r[0] = 0;
  int h = -1;
  for (int i = 1; i < n; i++) {
    if ((i & (i - 1)) == 0) h++;
    r[i] = r[i ^ (1 << h)];
    r[i] |= (1 << (k - h - 1));
  }
  vector<complex<double> > root(n);
  for (int i = 0; i < n; i++) {
    double ang = 2.0 * PI * i / n;
    root[i] = complex<double>(cos(ang), sin(ang));
  }
  vector<complex<double> > cur(n);
  for (int i = 0; i < n; i++) cur[i] = as[r[i]];
  for (int len = 1; len < n; len <<= 1) {
    vector<complex<double> > ncur(n);
    int step = n / (len << 1);
    for (int pdest = 0; pdest < n;) {
      for (int i = 0; i < len; i++) {
        complex<double> val = root[i * step] * cur[pdest + len];
        ncur[pdest] = cur[pdest] + val;
        ncur[pdest + len] = cur[pdest] - val;
        pdest++;
      }
      pdest += len;
    }
    cur.swap(ncur);
  }
  return cur;
}
vector<complex<double> > inv_fft(const vector<complex<double> >& fa) {
  vector<complex<double> > res = fft(fa);
  int nn = res.size();
  for (int i = 0; i < nn; i++) {
    res[i] /= nn;
  }
  reverse(res.begin() + 1, res.end());
  return res;
}
vector<complex<double> > multiply(vector<complex<double> >& a,
                                  vector<complex<double> >& b) {
  int len = a.size() + b.size();
  while (len & (len - 1)) ++len;
  a.resize(len);
  b.resize(len);
  a = fft(a);
  b = fft(b);
  for (int i = 0; i < len; ++i) a[i] *= b[i];
  a = inv_fft(a);
  return a;
}
void create(string& s, int size, char x, int k, vector<complex<double> >& v) {
  complex<double> zero(0, 0);
  for (int i = 0, b = 1; i < size; i += b, b = 1) {
    if (s[i] == x) {
      b = 0;
      v[i] = 1;
      for (int j = i - 1; j >= 0 && s[j] != x && v[j] == zero && j >= i - k;
           j--)
        v[j] = 1;
      int tmp = i;
      for (++i; i < size && s[i] != x && i <= tmp + k && v[i] == zero; i++)
        v[i] = 1;
    }
  }
}
int main() {
  ios::sync_with_stdio(false), cin.tie(nullptr);
  int k, a = 0, g = 0, c = 0, t = 0, n, m;
  string s, s2;
  cin >> n >> m >> k >> s >> s2;
  for (int i = 0; i < m / 2; i++) {
    swap(s2[i], s2[m - 1 - i]);
  }
  int size = 1;
  while (size < m + n - 1) size *= 2;
  vector<complex<double> > av(n), av2(m);
  create(s, n, 'A', k, av);
  create(s2, m, 'A', 0, av2);
  av = multiply(av, av2);
  vector<complex<double> > tv(n), tv2(m);
  create(s, n, 'T', k, tv);
  create(s2, m, 'T', 0, tv2);
  tv = multiply(tv, tv2);
  vector<complex<double> > gv(n), gv2(m);
  create(s, n, 'G', k, gv);
  create(s2, m, 'G', 0, gv2);
  gv = multiply(gv, gv2);
  vector<complex<double> > cv(n), cv2(m);
  create(s, n, 'C', k, cv);
  create(s2, m, 'C', 0, cv2);
  cv = multiply(cv, cv2);
  int sum = 0;
  for (int i = 0; i < cv.size(); i++)
    sum += ((int)(cv[i].real() + gv[i].real() + av[i].real() + tv[i].real() +
                  0.3) == m);
  cout << sum;
  return 0;
}
