#include <bits/stdc++.h>
using namespace std;
const int N = 8e5 + 7, mod = (479 << 21) + 1, root = 3;
int mp[N][5], Hash[300], n, len, tot, i, j, K, L, R[N], inv, m, S[N], T[N], nxt,
    res[N];
long long a[N], b[N];
char ch;
long long pow_mod(long long x, long long n) {
  long long res = 1;
  while (n) {
    if (n & 1) res = res * x % mod;
    x = x * x % mod;
    n >>= 1;
  }
  return res;
}
void ntt(long long* x, int type) {
  for (int i = 0; i < n; ++i)
    if (i < R[i]) swap(x[i], x[R[i]]);
  for (int i = 1; i < n; i <<= 1) {
    long long wn = pow_mod(root, type == 1 ? (mod - 1) / (i << 1)
                                           : mod - 1 - (mod - 1) / (i << 1));
    for (int p = i << 1, j = 0; j < n; j += p) {
      long long w = 1;
      for (int k = 0; k < i; ++k, (w *= wn) %= mod) {
        long long l = x[j + k], r = x[j + k + i] * w % mod;
        x[j + k] = (l + r) % mod;
        x[j + k + i] = ((l - r) % mod + mod) % mod;
      }
    }
  }
}
int main() {
  Hash['A'] = 1;
  Hash['T'] = 2;
  Hash['C'] = 3;
  Hash['G'] = 4;
  for (scanf("%d%d%d", &n, &len, &K), n--, i = 0; i <= n; ++i)
    scanf(" %c", &ch), S[i] = Hash[ch];
  for (len--, i = 0; i <= len; ++i) scanf(" %c", &ch), T[i] = Hash[ch];
  for (i = 1; i <= 4; ++i) {
    for (nxt = -N, j = 0; j <= n; ++j) {
      if (S[j] == i) nxt = j;
      if (j - nxt <= K) mp[j][i] = 1;
    }
    for (nxt = N, j = n; j >= 0; --j) {
      if (S[j] == i) nxt = j;
      if (nxt - j <= K) mp[j][i] = 1;
    }
  }
  for (m = n * 2, n = 1; n <= m; n <<= 1) L++;
  for (i = 0; i < n; ++i) R[i] = (R[i >> 1] >> 1) | ((i & 1) << (L - 1));
  for (inv = pow_mod(n, mod - 2), j = 1; j <= 4; ++j) {
    for (i = 0; i <= m / 2; ++i) a[i] = mp[m / 2 - i][j];
    for (i = 0; i <= len; ++i) b[i] = T[i] == j;
    ntt(a, 1);
    ntt(b, 1);
    for (i = 0; i < n; ++i) a[i] = a[i] * b[i];
    ntt(a, -1);
    for (i = 0; i <= m / 2; ++i) res[i] += a[m / 2 - i] * inv % mod;
    for (i = 0; i < n; ++i) a[i] = b[i] = 0;
  }
  for (i = 0; i <= m / 2; ++i)
    if (res[i] == len + 1) tot++;
  return 0 * printf("%d\n", tot);
}
