#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T &x) {
  x = 0;
  char c = getchar();
  int f = 1;
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) x = x * 10 - '0' + c, c = getchar();
  x *= f;
}
const int mod = 998244353, G = 3, N = (1 << 19) + 233;
long long Pow(long long x, long long y) {
  long long res = 1;
  while (y) {
    if (y & 1) res = res * x % mod;
    x = x * x % mod, y >>= 1;
  }
  return res;
}
int rev[N];
void get(int l) {
  for (int i = 1; i < (1 << l); ++i)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << l - 1);
}
void FFT(long long A[], int len, int f) {
  for (int i = 0; i < len; ++i)
    if (rev[i] < i) swap(A[i], A[rev[i]]);
  for (int l = 2; l <= len; l <<= 1) {
    long long wn = Pow(G, f == 1 ? (mod - 1) / l : mod - 1 - (mod - 1) / l);
    for (int i = 0; i < len; i += l) {
      long long w = 1;
      for (int k = i; k < i + (l >> 1); ++k, w = w * wn % mod) {
        long long t1 = A[k], t2 = A[k + (l >> 1)] * w % mod;
        A[k] = (t1 + t2) % mod, A[k + (l >> 1)] = (t1 - t2 + mod) % mod;
      }
    }
  }
  if (f == -1) {
    long long Inv = Pow(len, mod - 2);
    for (int i = 0; i < len; ++i) A[i] = A[i] * Inv % mod;
  }
}
inline int idx(char c) {
  if (c == 'A') return 0;
  if (c == 'C') return 1;
  if (c == 'G') return 2;
  return 3;
}
int m, l1, l2, len, cnt;
int S[N], T[N], sum[N], ans[N];
long long A[N], B[N];
char str[N];
void solve(int c) {
  memset(sum, 0, sizeof(sum));
  memset(A, 0, sizeof(A)), memset(B, 0, sizeof(B));
  for (int i = 0; i < l1; ++i)
    if (S[i] == c) sum[max(0, i - m)]++, sum[min(l1, i + m + 1)]--;
  for (int i = 0; i < l1; ++i) sum[i] += sum[i - 1], A[i] = sum[i] != 0;
  for (int i = 0; i < l2; ++i) B[l2 - i] = T[i] == c;
  FFT(A, len, 1), FFT(B, len, 1);
  for (int i = 0; i < len; ++i) A[i] = A[i] * B[i] % mod;
  FFT(A, len, -1);
  for (int i = 0; i < l1; ++i) ans[i] += A[l2 + i];
}
int main() {
  read(l1), read(l2), read(m);
  scanf("%s", str);
  for (int i = 0; i < l1; ++i) S[i] = idx(str[i]);
  scanf("%s", str);
  for (int i = 0; i < l2; ++i) T[i] = idx(str[i]);
  cnt = 0, len = 1;
  while (len <= l1 + l2) len <<= 1, cnt++;
  get(cnt);
  for (int i = 0; i < 4; ++i) solve(i);
  int tot = 0;
  for (int i = 0; i < l1; ++i)
    if (ans[i] == l2) tot++;
  printf("%d", tot);
  return 0;
}
