#include <bits/stdc++.h>
using namespace std;
const int N = 530005;
const double pi = acos(-1);
int ans, ton[N], n, m, k, lm, L, r[N];
char s[N], t[N];
complex<double> a[N], b[N];
void init() { scanf("%d%d%d%s%s", &n, &m, &k, s, t); }
void fft(complex<double> *f, int op) {
  for (int i = 0; i < lm; i++)
    if (i > r[i]) swap(f[i], f[r[i]]);
  for (int l = 1; l < lm; l <<= 1) {
    complex<double> wn(cos(pi / l), op * sin(pi / l));
    for (int i = 0; i < lm; i += (l << 1)) {
      complex<double> w(1, 0);
      for (int j = 0; j < l; j++, w *= wn) {
        complex<double> T = w * f[i + j + l];
        f[i + j + l] = f[i + j] - T;
        f[i + j] += T;
      }
    }
  }
  if (op == -1)
    for (int i = 0; i < lm; i++) f[i] /= lm;
}
void calc(char c) {
  memset(a, 0, sizeof(a));
  memset(b, 0, sizeof(b));
  int cnt = 0;
  for (int i = 0; i < k; i++) cnt += (s[i] == c);
  for (int i = 0; i < n; i++) {
    if (i + k < n) cnt += (s[i + k] == c);
    if (i - k - 1 >= 0) cnt -= s[i - k - 1] == c;
    a[i] = cnt > 0 ? 1 : 0;
  }
  for (int i = 0; i < m; i++) b[i] = (t[i] == c);
  fft(a, 1);
  fft(b, 1);
  for (int i = 0; i < lm; i++) a[i] *= b[i];
  fft(a, -1);
  for (int i = 0; i <= n - m; i++) ton[i] += (int)(a[i + m - 1].real() + 0.5);
}
void solve() {
  for (lm = 1; lm <= n + m - 2; lm <<= 1, L++)
    ;
  for (int i = 0; i < lm; i++) r[i] = (r[i >> 1] >> 1) | ((i & 1) << (L - 1));
  reverse(t, t + m);
  calc('A');
  calc('G');
  calc('C');
  calc('T');
  for (int i = 0; i <= n - m; i++)
    if (ton[i] == m) ans++;
  printf("%d\n", ans);
}
int main() {
  init();
  solve();
  return 0;
}
