#include <bits/stdc++.h>
int dx[4] = {0, -1, 0, 1};
int dy[4] = {1, 0, -1, 0};
using namespace std;
struct Complex {
  double x, y;
  Complex(double _x = 0.0, double _y = 0.0) : x(_x), y(_y) {}
};
Complex operator+(Complex a, Complex b) {
  return Complex(a.x + b.x, a.y + b.y);
}
Complex operator-(Complex a, Complex b) {
  return Complex(a.x - b.x, a.y - b.y);
}
Complex operator*(Complex a, Complex b) {
  return Complex(a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x);
}
void FFT(Complex p[], int n, double oper = 1.0) {
  for (int i = 1, j = 0; i < n - 1; i++) {
    for (int s = n; j ^= s >>= 1, ~j & s;)
      ;
    if (i < j) {
      swap(p[i], p[j]);
    }
  }
  for (int d = 0; (1 << d) < n; d++) {
    int m = 1 << d, m2 = m << 1;
    double p0 = acos(-1.0) / m * oper;
    Complex unit_p0(cos(p0), sin(p0));
    ;
    for (int i = 0; i < n; i += m2) {
      Complex unit(1);
      for (int j = 0; j < m; j++) {
        Complex &p1 = p[i + j], &p2 = p[i + j + m];
        Complex t = unit * p2;
        p2 = p1 - t;
        p1 = p1 + t;
        unit = unit * unit_p0;
      }
    }
  }
}
int n, m, K;
int ans[423456];
int s[423456], t[423456];
string S, T;
Complex x[423456], y[423456], z[423456];
void work() {
  int len = 1;
  while (len < max(n, m)) len *= 2;
  for (int i = 0; i < int(len); ++i) {
    if (i < n)
      y[i] = Complex(s[n - 1 - i]);
    else
      y[i] = Complex();
    if (i < m)
      x[i] = Complex(t[i]);
    else
      x[i] = Complex();
  }
  FFT(x, len);
  FFT(y, len);
  for (int i = 0; i < int(len); ++i) z[i] = x[i] * y[i];
  FFT(z, len, -1.0);
  int cnt = 0;
  for (int i = 0; i < int(m); ++i)
    if (t[i]) cnt++;
  for (int i = 0; i < int(n); ++i)
    if (i >= m - 1) {
      int r = z[i].x / len + 0.3;
      if (r == cnt) ans[i]++;
    }
}
int Main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> m >> K;
  cin >> S >> T;
  for (int ii = 0; ii < int(4); ++ii) {
    memset(s, 0, sizeof s);
    memset(t, 0, sizeof t);
    char c;
    if (ii == 0)
      c = 'A';
    else if (ii == 1)
      c = 'T';
    else if (ii == 2)
      c = 'C';
    else
      c = 'G';
    int pre = -1;
    for (int i = 0; i < int(n); ++i) {
      if (S[i] == c) pre = i;
      if (pre != -1 && i - pre <= K) s[i] = 1;
    }
    pre = n;
    for (int i = n - 1; i >= 0; i--) {
      if (S[i] == c) pre = i;
      if (pre != n && pre - i <= K) s[i] = 1;
    }
    for (int i = 0; i < int(m); ++i)
      if (T[i] == c) t[i] = 1;
    work();
  }
  int cnt = 0;
  for (int i = 0; i < int(n); ++i)
    if (ans[i] == 4) cnt++;
  cout << cnt << endl;
  return 0;
}
int main() { return Main(); }
