#include <bits/stdc++.h>
using namespace std;
const int N = 1 << 19 | 1, M = 998244353;
char s[N], t[N];
int a[N], b[N], n, m, k, cnt[N];
int ksm(int x, int y) {
  int ans = 1;
  for (; y; y >>= 1, x = (long long)x * x % M)
    if (y & 1) ans = (long long)ans * x % M;
  return ans;
}
void init(int y[], int len) {
  for (int i = 1, j = len / 2; i < len - 1; i++) {
    if (i < j) swap(y[i], y[j]);
    int k = len / 2;
    while (j >= k) {
      j -= k;
      k /= 2;
    }
    j += k;
  }
}
void ntt(int y[], int len, int opt) {
  init(y, len);
  for (int h = 2; h <= len; h <<= 1) {
    int wn = ksm(3, (M - 1) / h);
    if (opt == -1) wn = ksm(wn, M - 2);
    for (int j = 0; j < len; j += h) {
      int w = 1;
      for (int k = j; k < j + h / 2; k++) {
        int u = y[k], v = (long long)y[k + h / 2] * w % M;
        y[k] = (u + v) % M;
        y[k + h / 2] = (u + M - v) % M;
        w = (long long)w * wn % M;
      }
    }
  }
  if (opt == 1) return;
  int temp = ksm(len, M - 2);
  for (int i = 0; i < len; i++) y[i] = (long long)y[i] * temp % M;
}
void solve(char c) {
  int last = -1e9;
  memset(a, 0, sizeof a);
  memset(b, 0, sizeof b);
  for (int i = 1; i <= n; i++) {
    if (s[i] == c) last = i;
    if (i - last <= k) a[i] = 1;
  }
  last = 1e9;
  for (int i = n; i; i--) {
    if (s[i] == c) last = i;
    if (last - i <= k) a[i] = 1;
  }
  for (int i = 1; i <= m; i++)
    if (t[i] == c) b[m - i] = 1;
  int len = 1;
  while (len < n + m) len <<= 1;
  ntt(a, len, 1);
  ntt(b, len, 1);
  for (int i = 0; i < len; i++) a[i] = (long long)a[i] * b[i] % M;
  ntt(a, len, -1);
  for (int i = 0; i < len; i++) cnt[i] += a[i];
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  scanf("%s", s + 1);
  scanf("%s", t + 1);
  solve('A');
  solve('C');
  solve('G');
  solve('T');
  int ans = 0;
  for (int i = 1; i <= n + m; i++)
    if (cnt[i] == m) ans++;
  printf("%d\n", ans);
}
