#include <bits/stdc++.h>
using namespace std;
const int mxn = 1e6 + 5, inf = 1e9;
const double PI = acos(-1);
int n, m, k, lim = 1, ans, l, r[mxn], cnt[mxn];
char s[mxn], t[mxn];
inline int read() {
  char c = getchar();
  int x = 0, f = 1;
  while (c > '9' || c < '0') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c <= '9' && c >= '0') {
    x = (x << 3) + (x << 1) + (c & 15);
    c = getchar();
  }
  return x * f;
}
inline int chkmax(int &x, int y) {
  if (x < y) x = y;
}
inline int chkmin(int &x, int y) {
  if (x > y) x = y;
}
struct cp {
  double x, y;
  cp(double xx = 0, double yy = 0) { x = xx, y = yy; }
  friend cp operator+(cp a, cp b) { return cp(a.x + b.x, a.y + b.y); }
  friend cp operator-(cp a, cp b) { return cp(a.x - b.x, a.y - b.y); }
  friend cp operator*(cp a, cp b) {
    return cp(a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x);
  }
} a[mxn], b[mxn];
void FFT(cp *p, int opt) {
  for (int i = 0; i < lim; ++i)
    if (i < r[i]) swap(p[i], p[r[i]]);
  for (int mid = 1; mid < lim; mid <<= 1) {
    cp wn = cp(cos(PI / mid), opt * sin(PI / mid));
    for (int len = mid << 1, j = 0; j < lim; j += len) {
      cp w(1, 0);
      for (int k = 0; k < mid; ++k, w = w * wn) {
        cp x = p[j + k], y = w * p[j + mid + k];
        p[j + k] = x + y, p[j + mid + k] = x - y;
      }
    }
  }
}
void solve(char c) {
  memset(a, 0, sizeof(a));
  memset(b, 0, sizeof(b));
  for (int i = 0, las = -inf; i < n; ++i) {
    if (s[i] == c) las = i;
    if (i - las <= k) a[i].x = 1;
  }
  for (int i = n - 1, las = inf; i >= 0; --i) {
    if (s[i] == c) las = i;
    if (las - i <= k) a[i].x = 1;
  }
  for (int i = 0; i < m; ++i) b[i].x = t[m - i - 1] == c;
  lim = 1, l = 0;
  while (lim < n) lim <<= 1, ++l;
  for (int i = 0; i < lim; ++i) r[i] = r[i >> 1] >> 1 | (i & 1 ? lim >> 1 : 0);
  FFT(a, 1);
  FFT(b, 1);
  for (int i = 0; i < lim; ++i) a[i] = a[i] * b[i];
  FFT(a, -1);
  for (int i = m - 1; i < n; ++i) cnt[i] += (int)(a[i].x / lim + 0.5);
}
int main() {
  n = read();
  m = read();
  k = read();
  scanf("%s %s", s, t);
  for (int i = 0; i < 4; ++i) solve("ACTG"[i]);
  for (int i = m - 1; i < n; ++i) ans += cnt[i] == m;
  printf("%d", ans);
  return 0;
}
