#include <bits/stdc++.h>
using namespace std;
const int maxN = 524291;
const char mp[] = "ATGC";
char s[maxN], t[maxN];
int S[maxN], T[maxN], g[maxN];
const int yyb = 998244353;
inline int power(int x, int y) {
  int o = 1;
  while (y) {
    if (y & 1) o = 1ll * o * x % yyb;
    x = 1ll * x * x % yyb, y >>= 1;
  }
  return o;
}
int unitRoot[maxN], rev[maxN];
inline void NTT(int *f, int len, bool opt) {
  int i, j, k, x, y, p, q;
  for (i = 1; i < len; ++i)
    if (i < rev[i]) swap(f[i], f[rev[i]]);
  for (i = 1; i < len; i <<= 1) {
    p = unitRoot[i];
    for (j = 0; j < len; j += i << 1)
      for (k = 0, q = 1; k < i; ++k, q = 1ll * p * q % yyb)
        x = f[j | k], y = 1ll * f[i | j | k] * q % yyb,
        f[j | k] = (x + y) % yyb, f[i | j | k] = (x - y) % yyb;
  }
}
int main() {
  int n, m, k, lim, len, invLen, i, now, ans = 0;
  scanf("%d%d%d%s%s", &n, &m, &k, s, t), lim = n + m - 1, reverse(t, t + m);
  for (len = 1; len < lim; len <<= 1) {
  }
  invLen = power(len, yyb - 2);
  for (i = 1; i < len; i <<= 1) unitRoot[i] = power(3, (yyb - 1) / (i << 1));
  for (i = 1; i < len; ++i)
    rev[i] = (rev[i >> 1] >> 1) | (i & 1 ? len >> 1 : 0);
  for (now = 0; now < 4; ++now) {
    memset(S, 0, sizeof(int) * len), memset(T + m, 0, sizeof(int) * (len - m));
    for (i = 0; i < n; ++i)
      if (s[i] == mp[now]) {
        ++S[max(0, i - k)];
        if (i + k + 1 < n) --S[i + k + 1];
      }
    for (i = 1; i < n; ++i) S[i] += S[i - 1];
    for (i = 0; i < n; ++i) S[i] = (bool)S[i];
    for (i = 0; i < m; ++i) T[i] = t[i] == mp[now];
    NTT(S, len, 0), NTT(T, len, 0);
    for (i = 0; i < len; ++i) g[i] = (1ll * S[i] * T[i] + g[i]) % yyb;
  }
  reverse(g + 1, g + len);
  NTT(g, len, 1);
  for (i = 0; i < lim; ++i) g[i] = 1ll * g[i] * invLen % yyb;
  for (i = m - 1; i < n; ++i) ans += ((g[i] - m) % yyb == 0);
  printf("%d\n", ans);
  return 0;
}
