#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
const int MAXN = 700011;
int n, m, k, ans[MAXN], L, N, M, R[MAXN], tot;
char ch[MAXN], s[MAXN], zi[12] = "ATGC";
complex<double> a[MAXN], b[MAXN];
inline int getint() {
  int w = 0, q = 0;
  char c = getchar();
  while ((c < '0' || c > '9') && c != '-') c = getchar();
  if (c == '-') q = 1, c = getchar();
  while (c >= '0' && c <= '9') w = w * 10 + c - '0', c = getchar();
  return q ? -w : w;
}
inline void fft(complex<double> *a, int n, int f) {
  for (int i = 0; i < n; i++)
    if (i < R[i]) swap(a[i], a[R[i]]);
  for (int i = 1; i < n; i <<= 1) {
    complex<double> wn(cos(pi / i), sin(pi * f / i)), x, t;
    for (int j = 0; j < n; j += (i << 1)) {
      complex<double> w(1, 0);
      for (int l = 0; l < i; l++, w *= wn) {
        x = a[j + l];
        t = a[j + i + l] * w;
        a[j + l] = x + t;
        a[j + i + l] = x - t;
      }
    }
  }
}
inline void work() {
  n = getint();
  m = getint();
  k = getint();
  n--;
  m--;
  scanf("%s", ch);
  scanf("%s", s);
  int last;
  for (int i = 0; i <= m; i++)
    if (i < m - i)
      swap(s[i], s[m - i]);
    else
      break;
  M = n + m;
  for (L = 0, N = 1; N <= M; N <<= 1) L++;
  for (int i = 0; i < N; i++) R[i] = (R[i >> 1] >> 1) | ((i & 1) << (L - 1));
  for (int l = 0; l < 4; l++) {
    memset(a, 0, sizeof(a));
    memset(b, 0, sizeof(b));
    last = -k - 1;
    for (int i = 0; i <= n; i++) {
      if (ch[i] == zi[l]) last = i;
      if (i - last <= k) a[i] = 1;
    }
    last = n + k + 1;
    for (int i = n; i >= 0; i--) {
      if (ch[i] == zi[l]) last = i;
      if (last - i <= k) a[i] = 1;
    }
    for (int i = 0; i <= m; i++)
      if (s[i] == zi[l]) b[i] = 1;
    fft(a, N, 1);
    fft(b, N, 1);
    for (int i = 0; i <= N; i++) a[i] *= b[i];
    fft(a, N, -1);
    for (int i = m; i <= M; i++) ans[i] += (int)(a[i].real() / N + 0.5);
  }
  for (int i = m; i <= n; i++)
    if (ans[i] == m + 1) tot++;
  printf("%d", tot);
}
int main() {
  work();
  return 0;
}
