#include <bits/stdc++.h>
using namespace std;
const int N = 200010;
const int oo = 0x3f3f3f3f;
char s[N], t[N];
int match[N];
const int MOD = 1004535809;
const int BASE = 3;
const int md = 1004535809;
const int gen = 3;
int pw(int a, int b) {
  int x = 1, step = 1 << 30;
  while (step > 0) {
    x = (long long)x * x % md;
    if (step & b) x = (long long)x * a % md;
    step >>= 1;
  }
  return x;
}
void fft(vector<int> &a) {
  int n = a.size();
  for (int i = 0; i < n; i++) {
    int j = 0;
    int x = i, y = n - 1;
    while (y > 0) {
      j = (j << 1) + (x & 1);
      x >>= 1;
      y >>= 1;
    }
    if (i < j) swap(a[i], a[j]);
  }
  for (int len = 1; len < n; len *= 2) {
    int root = pw(gen, (md - 1) / (2 * len));
    for (int i = 0; i < n; i += 2 * len) {
      int w = 1;
      for (int j = 0; j < len; j++) {
        int u = a[i + j];
        int v = (long long)a[i + j + len] * w % md;
        a[i + j] = u + v;
        if (a[i + j] >= md) a[i + j] -= md;
        a[i + j + len] = u - v;
        if (a[i + j + len] < 0) a[i + j + len] += md;
        w = (long long)w * root % md;
      }
    }
  }
}
void multiply(vector<int> a, vector<int> b, vector<int> &r) {
  int an = a.size();
  int bn = b.size();
  int nn = 1;
  while (nn < 2 * an || nn < 2 * bn) nn <<= 1;
  a.resize(nn);
  b.resize(nn);
  fft(a);
  fft(b);
  for (int i = 0; i < nn; i++) a[i] = (long long)a[i] * b[i] % md;
  reverse(++a.begin(), a.end());
  fft(a);
  int inv = pw(nn, md - 2);
  for (int i = 0; i < nn; i++) a[i] = (long long)a[i] * inv % md;
  r = a;
}
int main() {
  int let[4] = {'A', 'T', 'C', 'G'};
  int m, n, k;
  scanf("%d %d %d %s %s", &m, &n, &k, s, t);
  for (int l = 0; l < 4; l++) {
    vector<int> ps(m), pt(n);
    int last = -oo;
    for (int i = 0; i < m; i++) {
      if (s[i] == let[l]) {
        ps[i] = 1;
        last = i;
      } else if (i - last <= k)
        ps[i] = 1;
    }
    last = oo;
    for (int i = m - 1; i >= 0; i--) {
      if (s[i] == let[l])
        last = i;
      else if (last - i <= k)
        ps[i] = 1;
    }
    for (int i = n - 1; i >= 0; i--) {
      if (t[i] == let[l]) pt[n - 1 - i] = 1;
    }
    vector<int> r;
    multiply(ps, pt, r);
    for (int start = 0; start < m; start++) {
      if (start >= r.size()) break;
      match[start] += r[start + n - 1];
    }
  }
  int ans = 0;
  for (int i = 0; i < m; i++) {
    if (match[i] == n) ans++;
  }
  printf("%d\n", ans);
  return 0;
}
