#include <bits/stdc++.h>
const int maxn(1e6 + 10);
const double pi(acos(-1));
const char C[] = "AGCT";
struct complex {
  double x, y;
} w[maxn], A[maxn], B[maxn];
inline complex operator+(const complex &lhs, const complex &rhs) {
  return (complex){lhs.x + rhs.x, lhs.y + rhs.y};
}
inline complex operator-(const complex &lhs, const complex &rhs) {
  return (complex){lhs.x - rhs.x, lhs.y - rhs.y};
}
inline complex operator*(const complex &lhs, const complex &rhs) {
  return (complex){lhs.x * rhs.x - lhs.y * rhs.y,
                   lhs.y * rhs.x + lhs.x * rhs.y};
}
int r[maxn];
void FFT(complex *p, int N) {
  for (int i = 0; i < N; i++)
    if (i < r[i]) std::swap(p[i], p[r[i]]);
  for (int i = 1, s = 2, t = N >> 1; i < N; i <<= 1, s <<= 1, t >>= 1)
    for (int j = 0; j < N; j += s)
      for (int k = 0, o = 0; k < i; k++, o += t) {
        complex x = p[j + k], y = w[o] * p[i + j + k];
        p[j + k] = x + y, p[i + j + k] = x - y;
      }
}
int n, m, K, N, P, sum[4][maxn], ans[maxn];
char S[maxn], T[maxn];
int main() {
  scanf("%d%d%d%s%s", &n, &m, &K, S, T);
  for (N = 1, P = -1; N <= (n + m - 2); N <<= 1, ++P)
    ;
  for (int i = 0; i < N; i++) r[i] = (r[i >> 1] >> 1) | ((i & 1) << P);
  for (int i = 0; i < N; i++)
    w[i] = (complex){cos(2. * pi * i / N), sin(2. * pi * i / N)};
  for (int i = 1; i <= n; i++)
    for (int j = 0; j < 4; j++)
      if (S[i - 1] == C[j]) ++sum[j][i];
  for (int i = 1; i <= n; i++)
    for (int j = 0; j < 4; j++) sum[j][i] += sum[j][i - 1];
  for (int k = 0; k < 4; k++) {
    std::fill(A, A + N, (complex){0, 0});
    std::fill(B, B + N, (complex){0, 0});
    for (int i = 0; i < n; i++)
      if (sum[k][std::min(n, i + K + 1)] - sum[k][std::max(0, i - K)])
        A[i].x = 1;
    for (int i = 0; i < m; i++)
      if (T[m - i - 1] == C[k]) B[i].x = 1;
    FFT(A, N), FFT(B, N);
    for (int i = 0; i < N; i++) A[i] = A[i] * B[i];
    for (int i = 0; i < N; i++) w[i].y = -w[i].y;
    FFT(A, N);
    for (int i = m - 1; i < n; i++) ans[i - m + 1] += (int)(A[i].x / N + .5);
    for (int i = 0; i < N; i++) w[i].y = -w[i].y;
  }
  int res = 0;
  for (int i = 0; i < n; i++)
    if (ans[i] == m) ++res;
  printf("%d\n", res);
  return 0;
}
