#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8, pi = acos(-1.0);
void rev(vector<complex<double> > &a, int n) {
  int i, j, k;
  for (i = 1, j = n >> 1; i < n - 1; i++) {
    if (i < j) swap(a[i], a[j]);
    for (k = n >> 1; j >= k; j -= k, k >>= 1)
      ;
    j += k;
  }
}
void dft(vector<complex<double> > &a, int n, int flag = 1) {
  rev(a, n);
  for (int m = 2; m <= n; m <<= 1) {
    complex<double> wm =
        complex<double>(cos(flag * 2 * pi / m), sin(flag * 2 * pi / m));
    for (int k = 0; k < n; k += m) {
      complex<double> w = complex<double>(1.0, 0.0);
      for (int j = k; j < k + (m >> 1); j++, w = w * wm) {
        complex<double> u = a[j], v = a[j + (m >> 1)] * w;
        a[j] = u + v;
        a[j + (m >> 1)] = u - v;
      }
    }
  }
}
vector<int> mul(vector<int> &A, vector<int> &B) {
  int N = 1;
  while (N < max(A.size(), B.size())) N *= 2;
  N *= 2;
  vector<complex<double> > a(A.begin(), A.end());
  vector<complex<double> > b(B.begin(), B.end());
  vector<int> result(N);
  a.resize(N), b.resize(N);
  dft(a, N);
  dft(b, N);
  for (int i = 0; i < N; i++) a[i] = a[i] * b[i];
  dft(a, N, -1);
  for (int i = 0; i < N; i++) result[i] = (int)(a[i].real() / N + eps);
  return result;
}
int n, m, k;
char str1[200005], str2[200005];
void print(vector<int> &t) {
  int sz = t.size();
  for (int i = 0; i < sz; ++i) printf("%d", t[i]);
  puts("");
}
vector<int> solve(char c) {
  vector<int> MA(n, 0);
  for (int i = 0; i < n; ++i)
    if (str1[i] == c) {
      int s = max(0, i - k);
      int e = min(n - 1, i + k);
      MA[s]++;
      if (e + 1 < n) MA[e + 1]--;
    }
  for (int i = 1; i < n; ++i) MA[i] += MA[i - 1];
  for (int i = 0; i < n; ++i)
    if (MA[i]) MA[i] = 1;
  vector<int> MB(m, 0);
  for (int i = 0; i < m; ++i)
    if (str2[i] == c) MB[m - 1 - i] = 1;
  reverse(MA.begin(), MA.end());
  reverse(MB.begin(), MB.end());
  return mul(MA, MB);
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  scanf("%s%s", str1, str2);
  vector<int> A = solve('A');
  vector<int> C = solve('C');
  vector<int> G = solve('G');
  vector<int> T = solve('T');
  int ans = 0;
  for (int i = n - 1; i >= m - 1; --i) {
    ans += ((A[i] + C[i] + G[i] + T[i]) == m);
  }
  printf("%d\n", ans);
}
