#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5;
const int maxm = 3e5 + 5;
const int mod = 998244353;
const int G = 3;
const int DFT = 1;
const int IDFT = -1;
const int inv2 = 499122177;
int rev[maxn];
inline int add(int a, int b) {
  a += b;
  if (a >= mod) a -= mod;
  return a;
}
inline int sub(int a, int b) {
  a -= b;
  if (a < 0) a += mod;
  return a;
}
inline int mul(int a, int b) { return 1ll * a * b % mod; }
inline int mul(int a, int b, int c) { return 1ll * a * b % mod * c % mod; }
inline void inc(int &a, int b) {
  a += b;
  if (a >= mod) a -= mod;
}
inline void dec(int &a, int b) {
  a -= b;
  if (a < 0) a += mod;
}
inline int _pow(int a, int n) {
  int res = 1;
  while (n) {
    if (n & 1) res = mul(res, a);
    a = mul(a, a);
    n >>= 1;
  }
  return res;
}
void NTT(int *a, int len, int opt) {
  for (int i = 0; i < len; i++)
    if (i < rev[i]) swap(a[i], a[rev[i]]);
  for (int i = 1; i < len; i <<= 1) {
    int step = i << 1;
    int wn = _pow(G, (mod - 1) / (i << 1));
    if (opt == IDFT) wn = _pow(wn, mod - 2);
    for (int j = 0; j < len; j += step) {
      int w = 1;
      for (int k = 0; k < i; k++, w = mul(w, wn)) {
        int x = a[j + k];
        int y = mul(w, a[i + j + k]);
        a[j + k] = add(x, y);
        a[i + j + k] = sub(x, y);
      }
    }
  }
  if (opt == DFT) return;
  int invv = _pow(len, mod - 2);
  for (int i = 0; i < len; i++) a[i] = mul(a[i], invv);
}
char s[maxn];
char t[maxn];
int f[maxn];
int g[maxn];
int cnt[maxn];
void solve(int n, int m, int k, char opt, int bln) {
  for (int i = 0; i < bln; i++) f[i] = g[i] = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == opt) {
      int l = max(0, i - k);
      int r = min(n, i + k + 1);
      f[l]++;
      f[r]--;
    }
  }
  for (int i = 1; i < n; i++) f[i] += f[i - 1];
  for (int i = 0; i < n; i++)
    if (f[i]) f[i] = 1;
  for (int i = n; i < bln; i++) f[i] = 0;
  for (int i = 0; i < m; i++) g[i] = (t[i] == opt);
  for (int i = m; i < bln; i++) g[i] = 0;
  NTT(f, bln, DFT);
  NTT(g, bln, DFT);
  for (int i = 0; i < bln; i++) f[i] = mul(f[i], g[i]);
  NTT(f, bln, IDFT);
  for (int i = m - 1; i <= n - 1; i++) cnt[i] += f[i];
}
int main(void) {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  scanf("%s", s);
  scanf("%s", t);
  reverse(t, t + m);
  int bln = 1, bct = 0;
  while (bln < (n + m + 2)) bln <<= 1, bct++;
  for (int i = 0; i < bln; i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (bct - 1));
  solve(n, m, k, 'A', bln);
  solve(n, m, k, 'T', bln);
  solve(n, m, k, 'C', bln);
  solve(n, m, k, 'G', bln);
  int res = 0;
  for (int i = m - 1; i <= n - 1; i++) res += (cnt[i] == m);
  printf("%d\n", res);
  return 0;
}
