#include <bits/stdc++.h>
using namespace std;
const int maxn = 1 << 19;
const double eps = 1e-2;
const double PI = acos((double)-1);
struct pnt {
  double first, second;
  pnt() {}
  pnt(double first, double second) : first(first), second(second) {}
  inline pnt operator*(const pnt& a) {
    return pnt(first * a.first - second * a.second,
               first * a.second + second * a.first);
  }
  inline void operator*=(const pnt& a) {
    double tmp_x = first;
    first = first * a.first - second * a.second;
    second = tmp_x * a.second + second * a.first;
  }
  inline pnt operator+(const pnt& a) {
    return pnt(first + a.first, second + a.second);
  }
  inline void operator+=(const pnt& a) {
    first += a.first;
    second += a.second;
  }
  inline pnt operator-(const pnt& a) {
    return pnt(first - a.first, second - a.second);
  }
  inline pnt operator!() { return pnt(first, -second); }
  inline pnt operator*(double c) { return pnt(first * c, second * c); }
  inline pnt operator/(double c) { return pnt(first / c, second / c); }
};
pnt a[maxn];
pnt b[maxn];
pnt c[maxn];
pnt pp[maxn];
int p[maxn];
pnt w, tk, t1, t2;
void fft_forv(int n, pnt* a, int dr) {
  int nn = 1;
  while (nn < n) {
    w = pp[nn];
    if (dr == -1) w = !w;
    tk = pnt(1, 0);
    for (int j = 0; j < nn; j++) {
      for (int i = j; i < n; i += 2 * nn) {
        a[i + nn] *= tk;
        a[i] += a[i + nn];
        a[i + nn] = a[i] - a[i + nn] * 2;
      }
      tk = tk * w;
    }
    nn *= 2;
  }
}
void fft_rec(int n, pnt* a, int dr) {
  if (n == 1) return;
  n /= 2;
  fft_rec(n, a, dr);
  fft_rec(n, a + n, dr);
  w = pp[n];
  if (dr == -1) w = !w;
  tk = pnt(1, 0);
  for (int i = 0; i < n; i++) {
    a[i + n] *= tk;
    a[i] += a[i + n];
    a[i + n] = a[i] - a[i + n] * 2;
    tk = tk * w;
  }
}
void fft_smesh(int n, pnt* a, int dr) {
  if (n == 1) return;
  if (n <= 1 << 10) {
    fft_forv(n, a, dr);
    return;
  }
  n /= 2;
  fft_smesh(n, a, dr);
  fft_smesh(n, a + n, dr);
  w = pp[n];
  if (dr == -1) w = !w;
  tk = pnt(1, 0);
  for (int i = 0; i < n; i++) {
    t1 = a[i];
    t2 = a[i + n] * tk;
    a[i] = t1 + t2;
    a[i + n] = t1 - t2;
    tk = tk * w;
  }
}
void fft(int n, pnt* a, int dr) { fft_smesh(n, a, dr); }
void calcbit(int n) {
  int tk = 1, ff;
  int lg = 0;
  while (tk < n) {
    tk *= 2;
    lg++;
  }
  p[0] = 0;
  tk = 0;
  for (int i = 1; i < n; i++) {
    ff = lg;
    do {
      ff--;
      tk ^= 1 << ff;
    } while (((tk >> ff) & 1) == 0);
    p[i] = tk;
  }
}
void revbit(int& n, pnt* a) {
  for (int i = 0; i < n; i++) {
    if (p[i] > i) swap(a[i], a[p[i]]);
  }
}
void mul(int& an, pnt* a, int& cn, pnt* c) {
  cn = an;
  fft(cn, a, 1);
  a[cn] = a[0];
  for (int i = 0; i < cn; i++) {
    c[i] = c[i] +
           ((a[i] + !a[cn - i]) / 2) * ((a[i] - !a[cn - i]) / 2) * pnt(0, -1);
  }
}
void mul(int* a0, int* b0, int cn, int* c0) {
  for (int i = 0; i < cn; i++) {
    a[p[i]].first = a0[i];
    a[p[i]].second = b0[i];
  }
  mul(cn, a, cn, c);
  revbit(cn, c);
  fft(cn, c, -1);
  for (int i = 0; i < cn; i++) c[i] = c[i] / cn;
  for (int i = 0; i < cn; i++) {
    c0[i] = c[i].first > 0.5;
  }
}
string s0 = "ACGT";
int sum[maxn];
int poly1[maxn];
int poly2[maxn];
int res[maxn];
int bad[maxn];
char s1[maxn];
char s2[maxn];
int main() {
  int n, m, k;
  scanf("%d %d %d\n", &n, &m, &k);
  for (int i = 0; (1 << i) < maxn; i++) {
    pp[1 << i] = pnt(cos(PI / (1 << i)), sin(PI / (1 << i)));
  }
  int cn = 1;
  while (cn < n + m) {
    cn *= 2;
  }
  calcbit(cn);
  scanf("%s\n%s\n", s1, s2);
  for (int j = 0; j < 4; j++) {
    for (int i = 0; i < n; i++) {
      sum[i] = 0;
    }
    for (int i = 0; i < n; i++)
      if (s1[i] == s0[j]) {
        sum[max(0, i - k)]++;
        sum[min(n, i + k + 1)]--;
      }
    int cur = 0;
    for (int i = 0; i < n; i++) {
      cur += sum[i];
      if (cur == 0) {
        poly1[i] = 1;
      } else {
        poly1[i] = 0;
      }
    }
    for (int i = 0; i < m; i++) {
      if (s2[i] == s0[j]) {
        poly2[m - 1 - i] = 1;
      } else {
        poly2[m - 1 - i] = 0;
      }
    }
    mul(poly1, poly2, cn, res);
    for (int i = m - 1; i < n + m; i++) {
      if (res[i] > 0) {
        bad[i - (m - 1)] = 1;
      }
    }
  }
  int ans = 0;
  for (int i = 0; i <= n - m; i++)
    if (bad[i] == 0) {
      ans++;
    }
  cerr << clock() * 1. / CLOCKS_PER_SEC << endl;
  cout << ans << endl;
  return 0;
}
