#include <bits/stdc++.h>
using namespace std;
const int N = 1 << 19;
const double PI = acos(-1.0);
namespace FFT {
int n;
void init(int m) {
  n = 1;
  while (n < m) n <<= 1;
}
void FFT(complex<double> *a, int f = 1) {
  for (int i = 0, j = 0; i < n; i++) {
    if (j > i) swap(a[i], a[j]);
    int k = n;
    while (j & (k >>= 1)) j &= ~k;
    j |= k;
  }
  for (int i = 2; i <= n; i <<= 1) {
    int m = i >> 1;
    complex<double> wn(cos(2.0 * PI / i), f * sin(2.0 * PI / i));
    for (int j = 0; j < n; j += i) {
      complex<double> w(1);
      for (int k = 0; k < m; k++) {
        complex<double> x = a[j + k], y = a[j + k + m] * w;
        a[j + k] = x + y;
        a[j + k + m] = x - y;
        w = w * wn;
      }
    }
  }
  if (f == -1)
    for (int i = 0; i < n; i++) a[i] /= n;
}
}  // namespace FFT
const char *d = "ATGC";
char s[N], t[N];
complex<double> a[N], b[N];
int ans[N];
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  int n, m, K;
  cin >> n >> m >> K;
  cin >> s >> t;
  reverse(t, t + m);
  FFT::init(n + m - 1);
  for (int k = 0; k < (4); ++k) {
    memset(a, 0, sizeof(a)), memset(b, 0, sizeof(b));
    int pos = -N;
    for (int i = 0; i < n; i++) {
      if (s[i] == d[k]) pos = i;
      if (i - pos <= K) a[i] = complex<double>(1);
    }
    pos = N;
    for (int i = n - 1; i >= 0; i--) {
      if (s[i] == d[k]) pos = i;
      if (pos - i <= K) a[i] = complex<double>(1);
    }
    for (int i = 0; i < m; i++) {
      if (t[i] == d[k]) b[i] = complex<double>(1);
    }
    FFT::FFT(a), FFT::FFT(b);
    for (int i = 0; i < FFT::n; i++) a[i] = a[i] * b[i];
    FFT::FFT(a, -1);
    for (int i = 0; i < (n); ++i) ans[i] += (int)(a[i].real() + 0.5);
  }
  int cnt = 0;
  for (int i = 0; i < (n); ++i)
    if (ans[i] == m) cnt++;
  cout << cnt << endl;
  return 0;
}
