#include <bits/stdc++.h>
using namespace std;
const int maxn = 1005010;
const double PI = acos(-1.0);
struct cp {
  double r, i;
  cp(double _r = 0, double _i = 0) : r(_r), i(_i) {}
  cp operator+(cp x) { return cp(r + x.r, i + x.i); }
  cp operator-(cp x) { return cp(r - x.r, i - x.i); }
  cp operator*(cp x) { return cp(r * x.r - i * x.i, r * x.i + i * x.r); }
};
int n, m, k;
cp a[maxn], b[maxn], c[maxn], sp[maxn];
int dig[maxn], rev[maxn];
cp x, y;
int N, L;
void FFT(cp a[], int flag) {
  for (int i = 0; i < N; i++) sp[i] = a[rev[i]];
  for (int i = 0; i < N; i++) a[i] = sp[i];
  for (int i = 2; i <= N; i <<= 1) {
    cp wn(cos(2 * PI / i), flag * sin(2 * PI / i));
    for (int k = 0; k < N; k += i) {
      cp w(1, 0);
      for (int j = 0; j < i / 2; j++) {
        x = a[k + j];
        y = w * a[k + j + i / 2];
        a[k + j] = x + y;
        a[k + j + i / 2] = x - y;
        w = w * wn;
      }
    }
  }
  if (flag == -1)
    for (int i = 0; i < N; i++) a[i].r /= N;
}
char s1[maxn], s2[maxn];
int len1, len2;
int ans[maxn];
char key[4] = {'A', 'T', 'C', 'G'};
int main() {
  scanf("%d%d%d", &len1, &len2, &k);
  scanf("%s", s1);
  scanf("%s", s2);
  n = max(len1, len2);
  for (L = 0, N = 1; N < n; N <<= 1, ++L)
    ;
  ++L;
  N <<= 1;
  for (int i = 0; i < N; i++) {
    int len = 0;
    for (int t = i; t; t >>= 1) dig[len++] = t & 1;
    for (int j = 0; j < L; j++) rev[i] = rev[i] * 2 + dig[j];
  }
  for (int t = 0; t < 4; t++) {
    memset(a, 0, sizeof(a));
    memset(b, 0, sizeof(b));
    int last = -1;
    for (int i = 0; i < len1; i++) {
      if (s1[i] == key[t]) last = i;
      if (last >= 0 && i - last <= k) a[i] = cp(1, 0);
    }
    last = -1;
    for (int i = len2 - 1; i < len1; i++)
      ;
    for (int i = len1 - 1; i >= 0; i--) {
      if (s1[i] == key[t]) last = i;
      if (last >= 0 && last - i <= k) a[i] = cp(1, 0);
    }
    for (int i = 0; i < len2; i++)
      if (s2[len2 - 1 - i] == key[t]) b[i] = cp(1, 0);
    FFT(a, 1);
    FFT(b, 1);
    for (int i = 0; i < N; i++) c[i] = a[i] * b[i];
    FFT(c, -1);
    for (int i = 0; i < N; i++) ans[i] += (int)(c[i].r + 0.5);
  }
  int res = 0;
  for (int i = len2 - 1; i < len1; i++)
    if (ans[i] == len2) ++res;
  printf("%d", res);
  return 0;
}
