#include <bits/stdc++.h>
using namespace std;
char s1[300001], s2[300001];
int counts[210001][4];
int maps[2001];
int n, m, k;
int main() {
  cin >> n >> m >> k;
  bitset<300001> bitA[4];
  bitset<300001> bitB[4];
  bitset<300001> result;
  scanf("%s", s1);
  scanf("%s", s2);
  maps['A'] = 0;
  maps['T'] = 1;
  maps['C'] = 2;
  maps['G'] = 3;
  for (int i = 1; i <= n; i++) {
    counts[max(1, i - k)][maps[s1[i - 1]]] += 1;
    counts[min(n, i + k) + 1][maps[s1[i - 1]]] += -1;
    result[i] = 1;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j <= 3; j++) {
      counts[i][j] += counts[i - 1][j];
      bitA[j][i] = (counts[i][j] > 0);
    }
  }
  int ans = 0;
  for (int i = 1; i <= m; i++) {
    result &= bitA[maps[s2[i - 1]]] >> (i - 1);
  }
  cout << result.count() << endl;
  fclose(stdin);
}
