#include <bits/stdc++.h>
using namespace std;
bitset<200010> b[4], now;
char s[200010], t[200010];
int trans[500];
int tmp[4][200010];
int main() {
  int i, j, n, m, k;
  trans['A'] = 0;
  trans['G'] = 1;
  trans['C'] = 2;
  trans['T'] = 3;
  scanf("%d%d%d", &n, &m, &k);
  scanf("%s%s", s, t);
  for (i = 0; i < n; i++) {
    tmp[trans[(int)s[i]]][max(i - k, 0)]++;
    tmp[trans[(int)s[i]]][min(i + k + 1, n)]--;
  }
  for (i = 0; i <= n; i++)
    for (j = 0; j < 4; j++) {
      if (i) tmp[j][i] += tmp[j][i - 1];
      if (tmp[j][i] > 0)
        b[j][i] = 1;
      else
        b[j][i] = 0;
    }
  for (i = 0; i < n - m + 1; i++) now[i] = 1;
  for (i = 0; i < m; i++) {
    int p = trans[(int)t[i]];
    now &= b[p];
    now <<= 1;
    now[0] = 0;
  }
  printf("%d", now.count());
  return 0;
}
