#include <bits/stdc++.h>
using namespace std;
const string alpha = "ATGC";
const int mod(7340033);
const int root(5);
const int root_pw(1 << 20);
int modpow(long long b, int e) {
  int a(1);
  while (e) {
    if (e & 1) a = (a * b) % mod;
    b = (b * b) % mod;
    e >>= 1;
  }
  return a;
}
const int root_inv(modpow(5, mod - 2));
void fft(vector<int> &arr, bool inv) {
  int n = arr.size();
  vector<int> rev(n);
  for (int i = 0; i != n; ++i) {
    rev[i] = rev[i >> 1] >> 1;
    if (i & 1) rev[i] |= n >> 1;
    if (i < rev[i]) swap(arr[i], arr[rev[i]]);
  }
  int rt = inv ? root_inv : root;
  for (int len = 2; len <= n; len <<= 1) {
    int wn = modpow(rt, root_pw / len);
    for (int i = 0; i != n; i += len) {
      long long w = 1;
      for (int j = 0; j != len >> 1; ++j) {
        int u = arr[i + j];
        int v = (w * arr[i + j + (len >> 1)]) % mod;
        arr[i + j] = (u + v < mod) ? (u + v) : (u + v - mod);
        arr[i + j + (len >> 1)] = (u - v < 0) ? (u - v + mod) : (u - v);
        w = (w * wn) % mod;
      }
    }
  }
  if (inv) {
    long long mult = modpow(n, mod - 2);
    for (int &x : arr) x = (x * mult) % mod;
  }
}
int main() {
  int n, m, k;
  string s, t;
  cin >> n >> m >> k >> s >> t;
  int N(1);
  while (N < n) N <<= 1;
  N <<= 1;
  vector<int> arr[26];
  vector<int> kek[26];
  int yes[26];
  for (char c : alpha) {
    arr[c - 'A'] = kek[c - 'A'] = vector<int>(N);
    yes[c - 'A'] = 0;
  }
  for (int i = 0; i != n; ++i) {
    for (char c : alpha) {
      if (yes[c - 'A']) {
        yes[c - 'A']--;
        arr[c - 'A'][N - n + i] = 1;
      }
    }
    arr[s[i] - 'A'][N - n + i] = 1;
    for (int j = 1; j <= k && j <= i && !(arr[s[i] - 'A'][N - n + i - j]); ++j)
      arr[s[i] - 'A'][N - n + i - j] = 1;
    yes[s[i] - 'A'] = k;
  }
  for (int i = 0; i != m; ++i) kek[t[i] - 'A'][N - i - 1] = 1;
  for (char c : alpha) {
    fft(arr[c - 'A'], 0);
    fft(kek[c - 'A'], 0);
    for (int i = 0; i != N; ++i)
      arr[c - 'A'][i] = (1LL * arr[c - 'A'][i] * kek[c - 'A'][i]) % mod;
    fft(arr[c - 'A'], 1);
  }
  int ans = 0;
  for (int i = N - n - 1; i != N - m; ++i) {
    int s = 0;
    for (char c : alpha) s += arr[c - 'A'][i];
    if (s == m) ++ans;
  }
  cout << ans << '\n';
  return 0;
}
