#include <bits/stdc++.h>
using namespace std;
struct cpx {
  double r, i;
  cpx() {}
  cpx(double _r, double _i) {
    r = _r;
    i = _i;
  }
  cpx operator+(const cpx &b) { return cpx(r + b.r, i + b.i); }
  cpx operator-(const cpx &b) { return cpx(r - b.r, i - b.i); }
  cpx operator*(const cpx &b) {
    return cpx(r * b.r - i * b.i, r * b.i + i * b.r);
  }
} A[530010], B[530010];
void fft(cpx *a, int n, int on) {
  for (int i = 0, j = 0; i < n; ++i) {
    if (i > j) swap(a[i], a[j]);
    for (int l = (n >> 1); (j ^= l) < l; l >>= 1)
      ;
  }
  cpx u, t, w, wm;
  for (int m = 2; m <= n; m <<= 1) {
    wm = cpx(cos(2 * M_PI * on / m), sin(2 * M_PI * on / m));
    for (int j = 0; j < n; j += m) {
      w = cpx(1, 0);
      for (int k = j; k < j + m / 2; ++k) {
        u = a[k];
        t = a[k + m / 2] * w;
        a[k] = u + t;
        a[k + m / 2] = u - t;
        w = w * wm;
      }
    }
  }
  if (on == -1)
    for (int i = 0; i < n; ++i) a[i].r /= (double)n;
}
int tot, n, m, k, len, ans[530010];
bool flag[530010];
char s[530010], t[530010];
void solve(char c) {
  memset(A, 0, sizeof(A));
  memset(B, 0, sizeof(B));
  memset(flag, 0, sizeof(flag));
  for (int i = 1; i <= m; ++i) A[i].r = (s[m - i + 1] == c);
  int lst = -(k + 1);
  for (int i = 1; i <= n; ++i) {
    if (t[i] == c) lst = i;
    flag[i] |= (i - lst <= k);
  }
  lst = m + k + 1;
  for (int i = n; i >= 1; --i) {
    if (t[i] == c) lst = i;
    flag[i] |= (lst - i) <= k;
  }
  for (int i = 1; i <= n; ++i)
    if (flag[i]) B[i].r = 1;
  fft(A, len, 1);
  fft(B, len, 1);
  for (int i = 0; i < len; ++i) A[i] = A[i] * B[i];
  fft(A, len, -1);
  for (int i = 1; i <= n; ++i) ans[i] += int(round(A[i + m].r));
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  scanf("%s", t + 1);
  scanf("%s", s + 1);
  for (len = 1; len <= n + m + 2; len <<= 1)
    ;
  solve('A');
  solve('C');
  solve('G');
  solve('T');
  for (int i = 1; i <= n; ++i)
    if (ans[i] == m) ++tot;
  printf("%d\n", tot);
  return 0;
}
