#include <bits/stdc++.h>
using namespace std;
const int N = 200010;
int n, m, k, val[300], sp[N];
char a[N], x[N];
bitset<N> b[4], r;
int main() {
  int i, j;
  val['A'] = 0;
  val['C'] = 1;
  val['T'] = 2;
  val['G'] = 3;
  cin >> n >> m >> k;
  cin >> a;
  cin >> x;
  for (i = 0; i < n; ++i) a[i] = val[a[i]];
  for (j = 0; j < 4; ++j) {
    memset(sp, 0, sizeof(sp));
    for (i = 0; i < n; ++i)
      if (a[i] == j) {
        sp[max(0, i - k)]++;
        sp[min(n, i + k + 1)]--;
      }
    for (i = 0; i < n; ++i) {
      if (i) sp[i] += sp[i - 1];
      if (sp[i]) b[j][i] = 1;
    }
  }
  for (i = 0; i < n; ++i) r[i] = 1;
  for (i = 0; i < m; ++i) {
    x[i] = val[x[i]];
    r &= b[x[i]] >> i;
  }
  int rez = 0;
  for (i = 0; i < n; ++i)
    if (r[i]) ++rez;
  cout << rez;
  return 0;
}
