#include <bits/stdc++.h>
using namespace std;
int N, M, K, Ans, L[4], R[4];
char s[200005], t[200005];
bitset<200005> A[4], B;
int main() {
  scanf("%d%d%d%s%s", &N, &M, &K, s, t);
  for (int i = 0; i < N; i++)
    s[i] = (s[i] == 'A' ? 0 : (s[i] == 'T' ? 1 : (s[i] == 'G' ? 2 : 3)));
  for (int i = 0; i < M; i++)
    t[i] = (t[i] == 'A' ? 0 : (t[i] == 'T' ? 1 : (t[i] == 'G' ? 2 : 3)));
  for (int i = 0; i < 4; i++) L[i] = -(1 << 30), R[i] = 1 << 30;
  for (int i = 0; i < N; i++) {
    L[s[i]] = i;
    int x = N - i - 1;
    R[s[x]] = x;
    for (int j = 0; j < 4; j++) {
      if (i - L[j] <= K) A[j][i] = 1;
      if (R[j] - x <= K) A[j][x] = 1;
    }
    B[i] = 1;
  }
  for (int i = 0; i < M; i++) B &= A[t[i]] >> i;
  for (int i = 0; i < N; i++) Ans += B[i];
  printf("%d\n", Ans);
}
