#include <bits/stdc++.h>
using namespace std;
const int mxn = 1e6 + 5, inf = 1e9;
const double PI = acos(-1);
int n, m, k, lim = 1, ans, l, r[mxn], cnt[mxn];
char s[mxn], t[mxn];
inline int read() {
  char c = getchar();
  int x = 0, f = 1;
  while (c > '9' || c < '0') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c <= '9' && c >= '0') {
    x = (x << 3) + (x << 1) + (c & 15);
    c = getchar();
  }
  return x * f;
}
inline int chkmax(int &x, int y) {
  if (x < y) x = y;
}
inline int chkmin(int &x, int y) {
  if (x > y) x = y;
}
struct Complex {
  double x, y;
  Complex(double x = 0, double y = 0) : x(x), y(y) {}
  Complex conj() { return Complex(x, -y); }
  Complex operator*(const Complex a) {
    return Complex(x * a.x - y * a.y, x * a.y + y * a.x);
  }
  Complex operator+(const Complex a) { return Complex(x + a.x, y + a.y); }
  Complex operator-(const Complex a) { return Complex(x - a.x, y - a.y); }
  Complex operator/(const double a) { return Complex(x / a, y / a); }
  Complex operator*(const double a) { return Complex(x * a, y * a); }
};
void FFT(vector<Complex> &p, int opt) {
  p.resize(lim);
  for (int i = 0; i < lim; ++i)
    if (i < r[i]) swap(p[i], p[r[i]]);
  for (int mid = 1; mid < lim; mid <<= 1) {
    Complex wn = Complex(cos(PI / mid), opt * sin(PI / mid));
    for (int len = mid << 1, j = 0; j < lim; j += len) {
      Complex w(1, 0);
      for (int k = 0; k < mid; ++k, w = w * wn) {
        Complex x = p[j + k], y = w * p[j + mid + k];
        p[j + k] = x + y, p[j + mid + k] = x - y;
      }
    }
  }
  if (opt == -1)
    for (int i = 0; i < lim; ++i) p[i].x /= lim;
}
int main() {
  vector<int> v(100);
  v['A'] = 0;
  v['G'] = 1;
  v['T'] = 2;
  v['C'] = 3;
  n = read();
  m = read();
  k = read();
  scanf("%s %s", s, t);
  reverse(t, t + m);
  vector<int> A(n), B(m);
  for (int i = 0; i < n; ++i) A[i] = v[s[i]];
  for (int i = 0; i < m; ++i) B[i] = v[t[i]];
  for (int _ = 0; _ < 4; ++_) {
    vector<Complex> a(n), b(m);
    for (int i = 0, las = -inf; i < n; ++i) {
      if (A[i] == _) las = i;
      if (i - las <= k) a[i].x = 1;
    }
    for (int i = n - 1, las = inf; i >= 0; --i) {
      if (A[i] == _) las = i;
      if (las - i <= k) a[i].x = 1;
    }
    for (int i = 0; i < m; ++i) b[i].x = B[i] == _;
    lim = 1;
    while (lim < n) lim <<= 1;
    for (int i = 0; i < lim; ++i)
      r[i] = r[i >> 1] >> 1 | (i & 1 ? lim >> 1 : 0);
    FFT(a, 1);
    FFT(b, 1);
    for (int i = 0; i < lim; ++i) a[i] = a[i] * b[i];
    FFT(a, -1);
    for (int i = m - 1; i < n; ++i) cnt[i] += (int)(a[i].x + 0.5);
  }
  for (int i = m - 1; i < n; ++i) ans += cnt[i] == m;
  printf("%d", ans);
  return 0;
}
