#include <bits/stdc++.h>
using namespace std;
const int LOG = 19;
const int N = (1 << LOG);
const double pi = acos(-1);
complex<double> F[2][N];
int rev[N];
complex<double> w[N];
void initFFT() {
  double ang = 2 * pi / N;
  for (int i = 0; i < N; ++i) {
    w[i] = complex<double>(cos(ang * i), sin(ang * i));
  }
  rev[0] = 0;
  for (int mask = 1, k = 0; mask < N; ++mask) {
    if (mask == (1 << (k + 1))) ++k;
    rev[mask] = rev[mask ^ (1 << k)] ^ (1 << (LOG - k - 1));
  }
}
void fft(complex<double> *A, int k) {
  int n = (1 << k);
  for (int i = 0; i < n; ++i) {
    F[0][rev[i] >> (LOG - k)] = A[i];
  }
  int t = 0, nt = 1;
  for (int lvl = 0; lvl < k; ++lvl) {
    int len = 1 << lvl;
    for (int s = 0; s < n; s += len << 1) {
      for (int i = 0; i < len; ++i) {
        complex<double> add = F[t][s + i + len] * w[i << (LOG - 1 - lvl)];
        F[nt][s + i] = F[t][s + i] + add;
        F[nt][s + i + len] = F[t][s + i] - add;
      }
    }
    swap(t, nt);
  }
  for (int i = 0; i < n; ++i) {
    A[i] = F[t][i];
  }
}
void inverseFFT(complex<double> *A, int k) {
  int n = (1 << k);
  fft(A, k);
  reverse(A + 1, A + n);
  for (int i = 0; i < n; ++i) {
    A[i] /= n;
  }
}
const int MAXLEN = 2e5 + 10;
char S[MAXLEN], T[MAXLEN];
struct FORCHAR {
  char c;
  int n;
  complex<double> A[N];
  void init(int _c, char *s, int len) {
    c = _c;
    n = len;
    for (int i = 0; i < n; ++i) {
      A[i] = (s[i] == c ? 1 : 0);
    }
  }
  void addK(int k) {
    vector<int> tmp(n, 0);
    for (int i = 0; i < n; ++i) {
      if (A[i].real() == 1) {
        tmp[max(i - k, 0)]++;
        if (i + k + 1 < n) tmp[i + k + 1]--;
      }
    }
    for (int i = 0, p = 0; i < n; ++i) {
      p += tmp[i];
      if (p > 0) A[i] = 1;
    }
  }
};
FORCHAR a[2][4];
string chars = "ATGC";
complex<double> C[4][N];
int getPow2(int x) {
  int res = 1;
  while ((1 << res) <= x) res++;
  return res + 1;
}
void solve() {
  initFFT();
  int n, m, k;
  scanf("%d%d%d\n%s%s", &n, &m, &k, S, T);
  reverse(T, T + m);
  int maxn = max(n, m);
  int pwmax = getPow2(maxn);
  for (int i = 0; i < 4; ++i) {
    a[0][i].init(chars[i], S, n);
    a[1][i].init(chars[i], T, m);
    a[0][i].addK(k);
    fft(a[0][i].A, pwmax);
    fft(a[1][i].A, pwmax);
    for (int j = 0; j < (1 << pwmax); ++j) {
      C[i][j] = a[0][i].A[j] * a[1][i].A[j];
    }
    inverseFFT(C[i], pwmax);
  }
  int res = 0;
  for (int i = 0; i < (1 << pwmax); ++i) {
    int t = 0;
    for (int j = 0; j < 4; ++j) {
      t += round(C[j][i].real());
    }
    if (t == m) res++;
  }
  printf("%d\n", res);
}
int main() {
  solve();
  return 0;
}
