#include <bits/stdc++.h>
using namespace std;
const double P = acos(-1.0);
struct CC {
  double x, y;
  CC(double xx = 0, double yy = 0) { x = xx, y = yy; }
  CC operator+(const CC &a) const { return CC(x + a.x, y + a.y); }
  CC operator-(const CC &a) const { return CC(x - a.x, y - a.y); }
  CC operator*(const CC &a) const {
    return CC(x * a.x - y * a.y, x * a.y + y * a.x);
  }
};
void change(CC y[], int len) {
  for (int i = 1, j = len / 2; i < len - 1; i++) {
    if (i < j) swap(y[i], y[j]);
    int k = len / 2;
    while (j >= k) {
      j -= k;
      k /= 2;
    }
    if (j < k) j += k;
  }
}
void fft(CC y[], int len, int on) {
  change(y, len);
  for (int h = 2; h <= len; h <<= 1) {
    CC wn(cos(-on * 2 * P / h), sin(-on * 2 * P / h));
    for (int j = 0; j < len; j += h) {
      CC w(1, 0);
      for (int k = j; k < j + h / 2; k++) {
        CC u = y[k];
        CC t = w * y[k + h / 2];
        y[k] = u + t;
        y[k + h / 2] = u - t;
        w = w * wn;
      }
    }
  }
  if (on == -1) {
    for (int i = 0; i < len; i++) {
      y[i].x /= len;
    }
  }
}
const int maxm = 4e6 + 5;
CC A[maxm], B[maxm];
CC C[maxm];
int mark[maxm];
char s[maxm];
char t[maxm];
int a[maxm];
int b[maxm];
int n, m, k;
int len;
void cal(char c) {
  for (int i = 0; i < len; i++) a[i] = b[i] = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == c) {
      int l = max(i - k, 0);
      int r = min(i + k, n - 1);
      a[l]++;
      a[r + 1]--;
    }
  }
  for (int i = 1; i <= n; i++) a[i] += a[i - 1];
  for (int i = 0; i < n; i++)
    if (a[i]) a[i] = 1;
  int cnt = 0;
  for (int i = 0; i < m; i++) {
    if (t[i] == c) {
      b[i] = 1;
      cnt++;
    }
  }
  reverse(b, b + m);
  for (int i = 0; i < n; i++) A[i] = CC(a[i], 0);
  for (int i = n; i < len; i++) A[i] = CC(0, 0);
  for (int i = 0; i < m; i++) B[i] = CC(b[i], 0);
  for (int i = m; i < len; i++) B[i] = CC(0, 0);
  fft(A, len, 1);
  fft(B, len, 1);
  for (int i = 0; i < len; i++) C[i] = A[i] * B[i];
  fft(C, len, -1);
  for (int i = 0; i < len; i++) {
    if ((int)(C[i].x + 0.5) == cnt) {
      mark[i]++;
    }
  }
}
signed main() {
  cin >> n >> m >> k;
  scanf("%s", s);
  scanf("%s", t);
  len = 1;
  while (len < n * 2) len <<= 1;
  cal('A');
  cal('C');
  cal('G');
  cal('T');
  int ans = 0;
  for (int i = m - 1; i < n; i++) {
    if (mark[i] == 4) ans++;
  }
  cout << ans << endl;
  return 0;
}
