#include <bits/stdc++.h>
using namespace std;
int M = 7340033;
int N = 1 << 20;
int NP = 20;
struct Z {
  int x;
  Z() : x(0) {}
  Z(int y) { x = (M + (y % M)) % M; }
  Z(const Z& o) { x = o.x; }
  Z operator+(const Z& o) const { return Z(x + o.x); }
  Z operator-(const Z& o) const { return Z(M + x - o.x); }
  Z operator*(const Z& o) const { return Z((1ll * x) * (1ll * o.x) % M); }
  Z operator*(const int& o) const { return Z((1ll * x) * (1ll * o) % M); }
};
Z exp(Z a, int e) {
  if (e == 0) return 1;
  if (e == 1) return a;
  Z sol = exp(a, e / 2);
  sol = sol * sol;
  if (e % 2) sol = sol * a;
  return sol;
}
Z G = 3;
vector<Z> gs;
void initgs(int n) {
  N = 1;
  NP = 0;
  while (N <= 4 * n + 10) {
    NP++;
    N *= 2;
  }
  G = exp(G, M / N);
  gs.resize(N);
  gs[0] = 1;
  for (int i = 1; i < N; i++) gs[i] = gs[i - 1] * G;
}
vector<Z> fft(vector<Z> v, bool inverse) {
  if (inverse) reverse(gs.begin() + 1, gs.end());
  vector<Z> table[2];
  table[0].resize(N);
  table[1].resize(N);
  int t = (NP) % 2;
  int o = !t;
  int step = N;
  for (int i = 0; i < v.size(); i++) table[t][i] = v[i];
  swap(t, o);
  for (int d = NP - 1; d >= 0; d--) {
    step >>= 1;
    for (int i = 0; i < N; i += step) {
      for (int j = 0; j < step; j++) {
        int sqr = (2 * i) % N;
        table[t][i + j] = table[o][sqr + j] + gs[i] * table[o][sqr + j + step];
      }
    }
    swap(t, o);
  }
  if (inverse) {
    Z divn = exp(N, M - 2);
    for (int i = 0; i < N; i++) table[o][i] = table[o][i] * divn;
    reverse(gs.begin() + 1, gs.end());
  }
  return table[o];
}
char ss[200100], st[200100];
int pref[200100][4];
char pat[4] = {'A', 'T', 'G', 'C'};
vector<Z> tovz(char* s, int n) {
  vector<Z> vs;
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < 4; j++) vs.push_back(s[i] == j);
  }
  return vs;
}
vector<Z> mul(vector<Z> a, vector<Z> b) {
  a.resize(N);
  b.resize(N);
  vector<Z> sol(N);
  for (int i = 0; i < a.size(); i++) {
    sol[i] = a[i] * b[i];
  }
  return sol;
}
vector<Z> muln(vector<Z> a) {
  for (int i = 0; i < a.size(); i++) a[i] = a[i] * N;
  return a;
}
void pvec(const vector<Z>& a) {
  for (auto g : a) printf("%d ", g.x);
  printf("\n");
}
int main() {
  int s, t, k;
  scanf("%d %d %d", &s, &t, &k);
  initgs(s);
  scanf("%s%s", ss + 1, st + 1);
  for (int i = 1; i <= s; i++)
    for (int j = 0; j < 4; j++)
      if (ss[i] == pat[j]) ss[i] = j;
  for (int i = 1; i <= t; i++)
    for (int j = 0; j < 4; j++)
      if (st[i] == pat[j]) st[i] = j;
  for (int i = 1; i <= s; i++)
    for (int j = 0; j < 4; j++)
      if (ss[i] == j)
        pref[i][j] = pref[i - 1][j] + 1;
      else
        pref[i][j] = pref[i - 1][j];
  vector<Z> vs;
  for (int i = 0; i < 4; i++) vs.push_back(0);
  for (int i = 1; i <= s; i++) {
    for (int j = 0; j < 4; j++) {
      int l = max(1, i - k);
      int r = min(s, i + k);
      vs.push_back(pref[r][j] != pref[l - 1][j]);
    }
  }
  for (int i = 0; i < 4; i++) vs.push_back(0);
  vector<Z> vt = tovz(st, t);
  reverse(vt.begin(), vt.end());
  vector<Z> fs = fft(vs, false);
  vector<Z> ft = fft(vt, false);
  vector<Z> c = fft(mul(fs, ft), true);
  int cnt = 0;
  for (int i = 3; i < N; i += 4)
    if (c[i].x == t) cnt++;
  printf("%d\n", cnt);
  return 0;
}
