#include <bits/stdc++.h>
using namespace std;
const int N = 200000 + 10, M = 550000 + 10;
const double pi = acos(-1);
inline int rd() {
  int x = 0, w = 1;
  char ch = 0;
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 3) + (x << 1) + (ch ^ 48);
    ch = getchar();
  }
  return x * w;
}
struct comp {
  double r, i;
  comp() { r = i = 0; }
  comp(double nr, double ni) { r = nr, i = ni; }
  inline comp operator+(const comp &bb) const {
    return comp(r + bb.r, i + bb.i);
  }
  inline comp operator-(const comp &bb) const {
    return comp(r - bb.r, i - bb.i);
  }
  inline comp operator*(const comp &bb) const {
    return comp(r * bb.r - i * bb.i, r * bb.i + i * bb.r);
  }
} a[M], b[M];
int n, n0, m, nn, l, rdr[M];
inline void fft(comp *a, int op) {
  comp W, w, x, y;
  for (int i = 0; i < nn; ++i)
    if (i < rdr[i]) swap(a[i], a[rdr[i]]);
  for (int i = 1; i < nn; i <<= 1) {
    W = comp(cos(pi / i), op * sin(pi / i));
    for (int j = 0; j < nn; j += i << 1) {
      w = comp(1, 0);
      for (int k = 0; k < i; ++k, w = w * W) {
        x = a[j + k], y = w * a[j + k + i];
        a[j + k] = x + y, a[j + k + i] = x - y;
      }
    }
  }
}
char cc[N], ss[N], dna[4] = {'A', 'C', 'G', 'T'};
int sm[N], kk, ft[N], nt[N];
int main() {
  n = rd(), n0 = rd(), kk = rd();
  scanf("%s%s", cc, ss);
  m = n + n0, l = 0;
  for (nn = 1; nn <= m; nn <<= 1) ++l;
  for (int i = 0; i < nn; ++i)
    rdr[i] = (rdr[i >> 1] >> 1) | ((i & 1) << (l - 1));
  for (int h = 0; h < 4; ++h) {
    ft[0] = cc[0] == dna[h] ? 0 : -kk - 1;
    for (int i = 1; i < n; ++i) ft[i] = cc[i] == dna[h] ? i : ft[i - 1];
    nt[n - 1] = cc[n - 1] == dna[h] ? n - 1 : n + kk;
    for (int i = n - 2; i >= 0; --i) nt[i] = cc[i] == dna[h] ? i : nt[i + 1];
    for (int i = 0; i < n; ++i)
      a[i] = comp(min(abs(i - ft[i]), abs(i - nt[i])) <= kk, 0);
    for (int i = n; i <= nn; ++i) a[i] = comp(0, 0);
    for (int i = 0; i < n0; ++i) b[i] = comp(ss[n0 - i - 1] == dna[h], 0);
    for (int i = n0; i <= nn; ++i) b[i] = comp(0, 0);
    fft(a, 1), fft(b, 1);
    for (int i = 0; i < nn; ++i) a[i] = a[i] * b[i];
    fft(a, -1);
    for (int i = 0; i < n - n0 + 1; ++i)
      sm[i] += (int)(fabs(a[i + n0 - 1].r) / nn + 0.5);
  }
  int ans = 0;
  for (int i = 0; i < n - n0 + 1; ++i) ans += sm[i] == n0;
  printf("%d\n", ans);
  return 0;
}
