#include <bits/stdc++.h>
using namespace std;
const int MAXN = 540005;
const double pi = acos(-1.0);
struct Complex {
  double r, i;
  Complex() {}
  Complex(double r, double i) : r(r), i(i) {}
  Complex operator+(const Complex& t) const {
    return Complex(r + t.r, i + t.i);
  }
  Complex operator-(const Complex& t) const {
    return Complex(r - t.r, i - t.i);
  }
  Complex operator*(const Complex& t) const {
    return Complex(r * t.r - i * t.i, r * t.i + i * t.r);
  }
};
void FFT(Complex y[], int n, int rev) {
  for (int i = 1, j, k, t; i < n; ++i) {
    for (j = 0, k = n >> 1, t = i; k; k >>= 1, t >>= 1) j = j << 1 | t & 1;
    if (i < j) swap(y[i], y[j]);
  }
  for (int s = 2, ds = 1; s <= n; ds = s, s <<= 1) {
    Complex wn(cos(rev * 2 * pi / s), sin(rev * 2 * pi / s)), w(1, 0), t;
    for (int k = 0; k < ds; ++k, w = w * wn) {
      for (int i = k; i < n; i += s) {
        y[i + ds] = y[i] - (t = w * y[i + ds]);
        y[i] = y[i] + t;
      }
    }
  }
  if (rev == -1)
    for (int i = 0; i < n; ++i) y[i].r /= n;
}
Complex a[MAXN], b[MAXN];
int sum[201000];
char s[201000], t[201000];
int lens, lent, k;
int n;
int ans[MAXN];
int Map[233];
void solve(int x) {
  int need = 0;
  for (int i = 0; i < lent; i++) {
    b[i] = Complex((Map[t[lent - i - 1]] == x), 0);
    need += (Map[t[lent - i - 1]] == x);
  }
  for (int i = lent; i < n; i++) b[i] = Complex(0, 0);
  memset(sum, 0, sizeof(sum));
  for (int i = 0; i < lens; i++) {
    if (Map[s[i]] == x) {
      int l = max(i - k, 0);
      int r = min(i + k + 1, lens);
      sum[l]++, sum[r]--;
    }
  }
  for (int i = 1; i < lens; i++) sum[i] += sum[i - 1];
  for (int i = 0; i < lens; i++) a[i] = Complex((sum[i] > 0), 0);
  for (int i = lens; i < n; i++) a[i] = Complex(0, 0);
  FFT(a, n, 1);
  FFT(b, n, 1);
  for (int i = 0; i < n; i++) a[i] = a[i] * b[i];
  FFT(a, n, -1);
  for (int i = lent - 1; i <= lens - 1; i++) {
    if ((int)(a[i].r + 0.5) == need) {
      ans[i]++;
    }
  }
}
int main() {
  scanf("%d%d%d", &lens, &lent, &k);
  scanf("%s%s", s, t);
  n = 1;
  while (n < lens + lent) n <<= 1;
  Map['A'] = 0, Map['T'] = 1, Map['C'] = 2, Map['G'] = 3;
  memset(ans, 0, sizeof(ans));
  for (int i = 0; i < 4; i++) solve(i);
  int sol = 0;
  for (int i = lent - 1; i <= lens - 1; i++) {
    if (ans[i] == 4) sol++;
  }
  printf("%d\n", sol);
}
