#include <bits/stdc++.h>
using namespace std;
const int maxn = 200200;
const long long mod = 998244353;
inline long long kmi(long long x, long long y) {
  long long ans = 1;
  while (y) {
    if (y & 1) ans = ans * x % mod;
    x = x * x % mod;
    y >>= 1;
  }
  return ans;
}
long long a[maxn * 4], b[maxn * 4];
int n, rev[maxn * 4];
void ntt(long long *x, int f) {
  for (int i = 0; i < n; i++)
    if (i < rev[i]) swap(x[i], x[rev[i]]);
  for (int i = 1; i < n; i <<= 1) {
    long long wu = kmi(3, (mod - 1) / (i << 1));
    if (f == -1) wu = kmi(wu, mod - 2);
    for (int j = 0; j < n; j += (i << 1)) {
      long long w = 1;
      for (int k = 0; k < i; k++) {
        long long x1 = x[j + k], x2 = x[i + j + k] * w % mod;
        x[j + k] = (x1 + x2) % mod;
        x[i + j + k] = (x1 - x2 + mod) % mod;
        w = w * wu % mod;
      }
    }
  }
  if (f == -1) {
    long long inv = kmi(n, mod - 2);
    for (int i = 0; i < n; i++) x[i] = x[i] * inv % mod;
  }
}
int cnt = 0, id[maxn];
char ch[5] = {'0', 'A', 'T', 'G', 'C'};
bool ans[maxn] = {0};
int main() {
  std::ios::sync_with_stdio(false);
  int l1, l2, k;
  string s, T;
  cin >> l1 >> l2 >> k >> s >> T;
  for (int i = 0; i <= l1 - l2; i++) ans[i] = 1;
  for (int t = 1; t <= 4; t++) {
    cnt = 0;
    for (int i = 0; i < l1; i++)
      if (ch[t] == s[i]) id[++cnt] = i;
    memset(a, 0, sizeof(a));
    memset(b, 0, sizeof(b));
    for (int i = 1; i < cnt; i++) {
      for (int j = max(0, id[i] + k + 1); j <= id[i + 1] - k - 1 && j < l1; j++)
        a[j] = 1;
    }
    if (cnt) {
      for (int j = 0; j <= id[1] - k - 1; j++) a[j] = 1;
      for (int j = id[cnt] + k + 1; j < l1; j++) a[j] = 1;
    } else {
      for (int i = 0; i < l1; i++) a[i] = 1;
    }
    for (int i = 0; i < l2; i++)
      if (ch[t] == T[i]) b[l2 - 1 - i] = 1;
    for (n = 1; n < l1 + l2 - 1; n <<= 1)
      ;
    for (int i = 1; i < n; i++)
      rev[i] = (rev[i >> 1] >> 1) | (i & 1 ? n >> 1 : 0);
    ntt(a, 1);
    ntt(b, 1);
    for (int i = 0; i < n; i++) a[i] = a[i] * b[i] % mod;
    ntt(a, -1);
    for (int i = 0; i <= l1 - l2; i++)
      if (a[l2 + i - 1]) ans[i] = 0;
  }
  int sum = 0;
  for (int i = 0; i <= l1 - l2; i++) sum += ans[i];
  cout << sum << endl;
  return 0;
}
