#include <bits/stdc++.h>
using namespace std;
struct base {
  double x, y;
  base() { x = y = 0; }
  base(double _x, double _y) { x = _x, y = _y; }
  base(double _x) { x = _x, y = 0; }
  void operator=(double _x) { x = _x, y = 0; }
  double real() { return x; }
  double imag() { return y; }
  base operator+(const base& b) { return base(x + b.x, y + b.y); }
  void operator+=(const base& b) { x += b.x, y += b.y; }
  base operator*(const base& b) {
    return base(x * b.x - y * b.y, x * b.y + y * b.x);
  }
  void operator*=(const base& b) {
    double p = x * b.x - y * b.y, q = x * b.y + y * b.x;
    x = p, y = q;
  }
  void operator/=(double k) { x /= k, y /= k; }
  base operator-(const base& b) { return base(x - b.x, y - b.y); }
  void operator-=(const base& b) { x -= b.x, y -= b.y; }
  base conj() { return base(x, -y); }
};
double PI = 2.0 * acos(0.0);
base w[1 << 19], fa[1 << 19];
void fft(base a[], int n, bool invert) {
  for (int i = 1, j = 0; i < n; ++i) {
    int bit = n >> 1;
    for (; j >= bit; bit >>= 1) j -= bit;
    j += bit;
    if (i < j) swap(a[i], a[j]);
  }
  for (int len = 2; len <= n; len <<= 1) {
    double ang = 2 * PI / len * (invert ? -1 : 1);
    base wlen(cos(ang), sin(ang));
    for (int i = 0; i < n; i += len) {
      w[0] = 1;
      for (int j = 0; j < len / 2; ++j) {
        if (j & 1) w[j] = w[j - 1] * wlen;
        if (j && !(j & 1)) w[j] = w[j >> 1] * w[j >> 1];
        base u = a[i + j], v = (a[i + j + len / 2] * w[j]);
        a[i + j] = (u + v);
        a[i + j + len / 2] = (u - v);
      }
    }
  }
  if (invert)
    for (int i = 0; i < n; ++i) a[i] /= n;
}
void multiply(vector<int>& a, vector<int> b) {
  int fsz = a.size() + b.size() - 1;
  int n = 1;
  while (n < fsz) n <<= 1;
  a.resize(n);
  b.resize(n);
  for (int i = 0; i < n; i++) fa[i] = base(a[i]) + (base(0, 1) * base(b[i]));
  fft(fa, n, false);
  for (int i = 0; i <= (n >> 1); ++i) {
    base p = fa[i] + fa[(n - i) % n].conj();
    base q = fa[i] - fa[(n - i) % n].conj();
    fa[i] = (p * q * base(0, -0.25));
    if (i > 0) fa[(n - i)] = fa[i].conj();
  }
  fft(fa, n, true);
  a.resize(fsz);
  for (int i = 0; i < fsz; i++) a[i] = ((int)(fa[i].real() + 0.5));
}
const int N = 200005;
char second[N], T[N];
int cnt[N], pref[4][N], b[N];
vector<int> v1, v2;
int val(char c) {
  if (c == 'A') return 1;
  if (c == 'T') return 0;
  if (c == 'C') return 2;
  if (c == 'G') return 3;
}
int main() {
  int n, m, k;
  scanf("%d", &(n));
  scanf("%d", &(m));
  scanf("%d", &(k));
  v1.resize(n + 1);
  v2.resize(n + 1);
  scanf("%s ", second);
  scanf("%s", T);
  for (__typeof(n + 1) i = (1) - ((1) > (n + 1));
       i != (n + 1) - ((1) > (n + 1)); i += 1) {
    for (__typeof(4) j = (0) - ((0) > (4)); j != (4) - ((0) > (4)); j += 1)
      pref[j][i] = pref[j][i - 1];
    pref[val(second[i - 1])][i]++;
  }
  for (__typeof(4) j = (0) - ((0) > (4)); j != (4) - ((0) > (4)); j += 1) {
    v1.clear();
    v1.resize(n + 1);
    for (int i = 0; i < m; i++) v1[i] = (val(T[i]) == j);
    for (int i = 1; i <= n; i++) {
      int lo = i - k, hi = i + k;
      v2[n + 1 - i] = (pref[j][min(hi, n)] > pref[j][max(0, lo - 1)]);
    }
    multiply(v1, v2);
    for (int i = 1; i <= n; i++) cnt[i] += v1[i];
  }
  int ans = 0;
  for (int i = 1; i <= n; i++)
    if (cnt[i] == m) ans++;
  cout << ans << "\n";
}
