#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 2e5 + 5;
const long long P = (479 << 21) + 1;
const long long G = 3;
long long wn[21];
inline long long fpw(long long x, long long y, long long m) {
  long long rtn = 1;
  for (x = (x >= m ? x % m : x); y; y >>= 1) {
    if (y & 1) rtn = rtn * x % m;
    x = x * x % m;
  }
  return rtn;
}
inline void Getwn() {
  for (int i = 0; i < 21; i++) wn[i] = fpw(G, (P - 1) >> i, P);
}
inline vector<long long> ntt(vector<long long> rtn, int Rev = 1) {
  int ntt_n = rtn.size();
  for (int i = 0, j = 0; i < ntt_n; i++) {
    if (i > j) swap(rtn[i], rtn[j]);
    for (int k = (ntt_n >> 1); (j ^= k) < k; k >>= 1)
      ;
  }
  for (int i = 2, m = 1; i <= ntt_n; i <<= 1, m++) {
    long long w = 1, u, t;
    int mh = i >> 1;
    for (int j = 0; j < mh; j++) {
      for (int k = j; k < ntt_n; k += i) {
        u = rtn[k], t = w * rtn[k + mh] % P;
        rtn[k] = (u + t) % P;
        rtn[k + mh] = (u - t + P) % P;
      }
      w = w * wn[m] % P;
    }
  }
  if (!~Rev) {
    for (int i = 1; i < ntt_n / 2; i++) swap(rtn[i], rtn[ntt_n - i]);
    long long Revn = fpw(ntt_n, P - 2, P);
    for (int i = 0; i < ntt_n; i++) rtn[i] = rtn[i] * Revn % P;
  }
  return rtn;
}
int n, m, k;
int N = 1;
char s[MAX_N], t[MAX_N];
vector<long long> a, b;
int ans[MAX_N];
int tot;
inline void conv(char now) {
  Getwn();
  a = b = vector<long long>(N);
  for (int i = 0, j = 0; i < n && j < n; i++) {
    while ((s[j] && s[j] != now) || i - j > k) j++;
    if (s[j] == now && abs(i - j) <= k) a[i] = 1;
  }
  for (int i = 0; i < m; i++)
    if (t[i] == now) b[i] = 1;
  a = ntt(a);
  b = ntt(b);
  for (int i = 0; i < N; i++) a[i] = a[i] * b[i] % P;
  a = ntt(a, -1);
  for (int i = m - 1; i < n + m - 1; i++) ans[i - m + 1] += a[i];
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  while (N < n + m - 1) N <<= 1;
  scanf("%s", s);
  scanf("%s", t);
  for (int i = 0; i < m / 2; i++) swap(t[i], t[m - i - 1]);
  conv('A');
  conv('T');
  conv('G');
  conv('C');
  for (int i = 0; i < n; i++)
    if (ans[i] == m) tot++;
  printf("%d\n", tot);
  return 0;
}
