#include <bits/stdc++.h>
using namespace std;
const int N = 900011;
const double pi = acos(-1.0);
struct cp {
  double x, y;
  cp() {}
  cp(double x, double y) : x(x), y(y) {}
  cp operator+(const cp &a) const { return cp(x + a.x, y + a.y); }
  cp operator-(const cp &a) const { return cp(x - a.x, y - a.y); }
  cp operator*(const cp &a) const {
    return cp(x * a.x - y * a.y, x * a.y + y * a.x);
  }
  cp operator/(const double &a) const { return cp(x / a, y / a); }
};
int inv[N];
void fft(cp *a, int len, int tp) {
  for (int i = 0; i < len; i++)
    if (i < inv[i]) swap(a[i], a[inv[i]]);
  for (int i = 1; i < len; i <<= 1) {
    cp w0(cos(pi / i), tp * sin(pi / i));
    for (int j = 0; j < len; j += (i << 1)) {
      cp w(1, 0);
      for (int k = 0; k < i; k++, w = w * w0) {
        cp w1 = a[j + k], w2 = w * a[j + k + i];
        a[j + k] = w1 + w2, a[j + k + i] = w1 - w2;
      }
    }
  }
  if (tp == -1)
    for (int i = 0; i < len; i++) a[i] = a[i] / len;
}
int st, ss, n, m, k;
cp a[N], b[N], c[N];
char T[N], S[N];
int len = 1, pl;
int ctr[N];
void fuck(char ch) {
  memset(a, 0, sizeof(a));
  memset(b, 0, sizeof(b));
  for (int i = 0; i < st; i++)
    if (T[i] == ch) b[i].x = 1.0;
  int pr = -1;
  for (int i = 0; i < ss; i++) {
    if (S[i] == ch) pr = i;
    if (pr >= 0 && i - pr <= k) a[i].x = 1.0;
  }
  pr = -1;
  for (int i = ss - 1; i >= 0; i--) {
    if (S[i] == ch) pr = i;
    if (pr >= 0 && pr - i <= k) a[i].x = 1.0;
  }
  fft(a, len, 1), fft(b, len, 1);
  for (int i = 0; i < len; i++) c[i] = a[i] * b[i];
  fft(c, len, -1);
  for (int i = 0; i < len; i++) ctr[i] += (int)(c[i].x + 0.5);
}
int main() {
  scanf("%d%d%d%s%s", &ss, &st, &k, S, T);
  for (int i = 0; st - i - 1 > i; i++) swap(T[i], T[st - i - 1]);
  while (len < ss * 2) len <<= 1, pl++;
  for (int i = 1; i < len; i++)
    inv[i] = (inv[i >> 1] >> 1) | ((i & 1) << (pl - 1));
  fuck('A'), fuck('G'), fuck('C'), fuck('T');
  int ans = 0;
  for (int i = 0; i < ss; i++)
    if (ctr[i] >= st) ans++;
  printf("%d\n", ans);
  return 0;
}
