#include <bits/stdc++.h>
using namespace std;
const int M = 800000 + 10;
const double pi = acos(-1);
struct vir {
  double r, i;
  vir(double r = 0.0, double i = 0.0) : r(r), i(i) {}
  void print() { printf("%f %f\n", r, i); }
  vir operator+(const vir &c) { return vir(r + c.r, i + c.i); }
  vir operator-(const vir &c) { return vir(r - c.r, i - c.i); }
  vir operator*(const vir &c) {
    return vir(r * c.r - i * c.i, r * c.i + i * c.r);
  }
} a[M], b[M], w[2][M];
struct FFT {
  int N, na, nb, rev[M];
  void fft(vir *a, int f) {
    vir x, y;
    for (int i = (0); i < (N); i++)
      if (i < rev[i]) swap(a[i], a[rev[i]]);
    for (int i = 1; i < N; i <<= 1)
      for (int j = 0, t = N / (i << 1); j < N; j += i << 1)
        for (int k = 0, l = 0; k < i; k++, l += t)
          x = w[f][l] * a[j + k + i], y = a[j + k], a[j + k] = y + x,
          a[j + k + i] = y - x;
    if (f)
      for (int i = (0); i < (N); i++) a[i].r /= N;
  }
  void work() {
    int d = __builtin_ctz(N);
    for (int i = (0); i < (N); i++) {
      rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (d - 1));
      w[1][i] = w[0][i] = vir(cos(2 * pi * i / N), sin(2 * pi * i / N));
      w[1][i].i = -w[1][i].i;
    }
  }
  void doit(vir *a, vir *b, int na, int nb) {
    for (N = 1; N < na + nb - 1; N <<= 1)
      ;
    for (int i = (na); i < (N); i++) a[i] = vir(0, 0);
    for (int i = (nb); i < (N); i++) b[i] = vir(0, 0);
    work(), fft(a, 0), fft(b, 0);
    for (int i = (0); i < (N); i++) a[i] = a[i] * b[i];
    fft(a, 1);
  }
} fft;
int id(char a) {
  if (a == 'A')
    return 0;
  else if (a == 'T')
    return 1;
  else if (a == 'C')
    return 2;
  else
    return 3;
}
int ans[M];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m, k;
  cin >> n >> m >> k;
  string s, t;
  cin >> s >> t;
  reverse(t.begin(), t.end());
  for (int q = (0); q < (4); q++) {
    for (int i = (0); i < (m); i++) {
      if (id(t[i]) == q)
        b[i] = vir(1, 0);
      else
        b[i] = vir(0, 0);
    }
    int last = -1e9;
    for (int i = (0); i < (k); i++)
      if (id(s[i]) == q) last = i;
    for (int i = (0); i < (n); i++) {
      if (i + k < n && id(s[i + k]) == q) last = i + k;
      if (abs(last - i) <= k) {
        a[i] = vir(1, 0);
      } else {
        a[i] = vir(0, 0);
      }
    }
    fft.doit(a, b, n, m);
    for (int i = (0); i < (fft.N); i++) ans[i] += (int)((a[i].r) + 0.5);
  }
  int res = 0;
  for (int i = (m - 1); i < (n + 1); i++)
    if (ans[i] == m) res++;
  cout << res << "\n";
  return 0;
}
