#include <bits/stdc++.h>
using namespace std;
const int maxn = 2000000 + 10;
const double pi = acos(-1);
const double ex = 1e-6;
struct cd {
  double x, y;
  cd() {
    x = 0;
    y = 0;
  }
  cd(double xx, double yy) {
    x = xx;
    y = yy;
  }
  void cl() {
    x = 0;
    y = 0;
  }
  cd operator+(const cd &sec) { return cd(x + sec.x, y + sec.y); }
  cd operator-(const cd &sec) { return cd(x - sec.x, y - sec.y); }
  cd operator*(const cd &sec) {
    return cd(x * sec.x - y * sec.y, y * sec.x + x * sec.y);
  }
  cd operator/(const double &sec) { return cd(x / sec, y / sec); }
  cd operator+=(const cd &sec) {
    x += sec.x;
    y += sec.y;
  }
  cd operator/=(const double &sec) {
    x /= sec;
    y /= sec;
  }
  cd operator~() { return cd(x, -y); }
};
char ch[4] = {'A', 'G', 'C', 'T'};
int sl, tl, k, bit, len;
char s[maxn], t[maxn];
cd wn[maxn], a[maxn], c[maxn];
int rev[maxn];
void read() {
  cin >> sl >> tl >> k;
  scanf("%s%s", s, t);
}
inline int cbit(int x) {
  int y = log(x) / log(2);
  if (x == (1 << y)) return y;
  return y + 1;
}
inline int mi(int x) { return (x ? len - x : 0); }
inline int O(double x) { return (-ex < x && x < ex) ? 0 : (x > 0 ? 1 : -1); }
void fft(cd *a, int dft) {
  int step, i, j;
  cd x, y;
  for (i = 0; i < len; i++)
    if (i < rev[i]) swap(a[i], a[rev[i]]);
  for (step = 1; step < len; step <<= 1) {
    for (i = 0; i < len; i += step << 1)
      for (j = i; j < i + step; j++) {
        x = a[j];
        if (dft == 1)
          y = a[j + step] * wn[len / step / 2 * (j - i)];
        else
          y = a[j + step] * wn[mi(len / step / 2 * (j - i))];
        a[j] = x + y;
        a[j + step] = x - y;
      }
  }
  if (dft == -1)
    for (i = 0; i < len; i++) a[i] /= len;
}
void muti() {
  for (int i = 0; i < len; i++)
    c[i] += (~a[mi(i)] + a[i]) * cd(0, 1) * (~a[mi(i)] - a[i]) / 4;
}
void pre(char c) {
  int i, j;
  for (i = 0; i < len; i++) a[i].cl();
  for (i = 0; i < tl; i++)
    if (t[tl - i - 1] == c) a[i].y = 1;
  for (i = 0, j = 0; i < sl; i++)
    if (s[i] == c) {
      for (j = max(j, i - k); j <= i + k && j < sl; j++) a[j].x = 1;
    }
}
int check() {
  int i, ans = 0;
  for (i = tl - 1; i < sl; i++) ans += (!O(c[i].x - tl));
  return ans;
}
void solve() {
  int i;
  bit = cbit(sl + tl - 1);
  len = 1 << bit;
  for (i = 0; i < len; i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (bit - 1));
  for (i = 0; i < len; i++)
    wn[i] = cd(cos(2 * pi / len * i), sin(2 * pi / len * i));
  for (i = 0; i < 4; i++) {
    pre(ch[i]);
    fft(a, 1);
    muti();
  }
  fft(c, -1);
  cout << check();
}
int main() {
  read();
  solve();
  return 0;
}
