#include <bits/stdc++.h>
using namespace std;
const int maxn = 800010;
int n, m, N, M, K, L;
int ans[maxn], rev[maxn], id[maxn], cnt[5], vis[maxn][5];
char a[maxn], b[maxn];
complex<double> A[maxn], B[maxn];
void FFT(complex<double> *a, int f) {
  for (int i = 0; i < N; i++)
    if (rev[i] > i) swap(a[i], a[rev[i]]);
  for (int i = 1; i < N; i <<= 1) {
    complex<double> wn(cos(acos(-1.0) / i), sin(acos(-1.0) / i));
    for (int p = i << 1, j = 0; j < N; j += p) {
      complex<double> w(1, 0);
      for (int k = 0; k < i; k++, w *= wn) {
        complex<double> x = a[k + j], y = w * a[k + j + i];
        a[k + j] = x + y;
        a[k + j + i] = x - y;
      }
    }
  }
  if (f == -1) reverse(a + 1, a + N);
}
int main() {
  scanf("%d%d%d", &n, &m, &K);
  scanf("%s%s", a + 1, b + 1);
  id['A'] = 1;
  id['T'] = 2;
  id['G'] = 3;
  id['C'] = 4;
  for (int l = 0, r = 0, i = 1; i <= n; i++) {
    while (l < n && l < i - K) cnt[id[(int)a[l++]]]--;
    while (r < n && r < i + K) cnt[id[(int)a[++r]]]++;
    for (int j = 1; j <= 4; j++)
      if (cnt[j]) vis[i][j] = 1;
  }
  M = n + m;
  for (N = 1; N <= M; N <<= 1) L++;
  for (int i = 0; i < N; i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (L - 1));
  for (int k = 1; k <= 4; k++) {
    memset(A, 0, sizeof(A));
    memset(B, 0, sizeof(B));
    for (int i = 1; i <= n; i++) {
      if (vis[i][k])
        A[i - 1] = 1;
      else
        A[i - 1] = 0;
    }
    for (int i = 1; i <= m; i++) {
      if (id[(int)b[i]] == k)
        B[m - i] = 1;
      else
        B[m - i] = 0;
    }
    FFT(A, 1);
    FFT(B, 1);
    for (int i = 0; i < N; i++) A[i] *= B[i];
    FFT(A, -1);
    for (int i = 0; i < N; i++) ans[i] += (long long)(A[i].real() + 0.5) / N;
  }
  int res = 0;
  for (int i = 0; i < N; i++)
    if (ans[i] == m) res++;
  printf("%d", res);
  return 0;
}
