#include <bits/stdc++.h>
using namespace std;
double Pi = acos(-1);
struct cpx {
  double r, i;
  cpx() {
    r = 0;
    i = 0;
  }
  cpx(double a, double b) { r = a, i = b; }
  cpx operator+(cpx b) { return cpx(r + b.r, i + b.i); }
  cpx operator-(cpx b) { return cpx(r - b.r, i - b.i); }
  cpx operator*(cpx b) { return cpx(r * b.r - i * b.i, r * b.i + i * b.r); }
  cpx operator*=(cpx b) { return *this = *this * b; }
  cpx operator/=(double a) { return *this = cpx(r / a, i / a); }
} a[800005], b[800005], c[800005];
int n, m, k, w, vis[800005];
int cf[800005];
char A[800005], B[800005];
void DFT(cpx *A, int f) {
  for (int i = 1, j = 0; i < w; i++) {
    for (int d = w >> 1; j ^= d, ~j & d; d >>= 1)
      ;
    if (i < j) swap(A[i], A[j]);
  }
  for (int i = 1; i < w; i <<= 1) {
    cpx wn(cos(Pi / i), f * sin(Pi / i));
    for (int j = 0; j < w; j += i << 1) {
      int k = j + i;
      cpx w1(1, 0);
      for (int l = 0; l < i; l++) {
        cpx x = A[j + l], y = w1 * A[k + l];
        A[j + l] = x + y;
        A[k + l] = x - y;
        w1 *= wn;
      }
    }
  }
  if (f == -1)
    for (int i = 0; i < w; i++) A[i] /= w;
}
void Check(char z) {
  memset(a, 0, sizeof(a));
  memset(b, 0, sizeof(b));
  memset(c, 0, sizeof(c));
  memset(cf, 0, sizeof(cf));
  for (int i = 0; i < n; i++) {
    int l = max(0, i - k), r = min(i + k, n - 1);
    if (A[i] == z) {
      cf[l]++;
      cf[r + 1]--;
    }
  }
  for (int i = 0; i < n; i++) {
    cf[i + 1] += cf[i];
    if (cf[i]) a[i].r = 1;
  }
  int sum = 0;
  for (int i = 0; i < m; i++)
    if (B[i] == z) b[i].r = 1, sum++;
  for (w = 1; w <= n + m; w <<= 1)
    ;
  DFT(a, 1), DFT(b, 1);
  for (int i = 0; i < w; i++) c[i] = a[i] * b[i];
  DFT(c, -1);
  for (int i = m - 1; i < n; i++)
    if (int(c[i].r + 0.1) < sum) vis[i - m + 1] = 1;
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  scanf("%s%s", A, B);
  for (int i = 0; i < n; i++)
    if (i < n - i - 1) swap(A[i], A[n - i - 1]);
  Check('A'), Check('C'), Check('G'), Check('T');
  int ans = 0;
  for (int i = 0; i <= n - m; i++)
    if (!vis[i]) ans++;
  printf("%d\n", ans);
}
