#include <bits/stdc++.h>
using namespace std;
vector<int> ans;
int n, m, k, Ans, sum[600005];
char S[600005], T[600005];
const int mod = 998244353, G = 3, invG = 332748118;
int Ksm(int a, int n, int ans = 1) {
  for (; n; n >>= 1, a = 1ll * a * a % mod)
    if (n & 1) ans = 1ll * ans * a % mod;
  return ans;
}
int Mod(int x) { return x < mod ? x : x - mod; }
namespace Poly {
int yg[20][600005], yg2[20][600005], tr[20][600005];
void Pre(int mx) {
  for (int len = 1, tmp = 1; len < mx; len <<= 1, ++tmp) {
    int TG = Ksm(invG, (mod - 1) / (len << 1));
    for (int k = 0, buf = 1; k < len; ++k)
      yg[tmp][k] = buf, buf = 1ll * buf * TG % mod;
  }
  for (int len = 1, tmp = 1; len < mx; len <<= 1, ++tmp) {
    int TG = Ksm(G, (mod - 1) / (len << 1));
    for (int k = 0, buf = 1; k < len; ++k)
      yg2[tmp][k] = buf, buf = 1ll * buf * TG % mod;
  }
  for (int n = 1, tmp = 0; n <= mx; n <<= 1, ++tmp)
    for (int i = 0; i < n; ++i)
      tr[tmp][i] = (tr[tmp][i >> 1] >> 1) | ((i & 1) ? (n >> 1) : 0);
}
inline int Init(int m) {
  --m;
  int n = 1;
  while ((1 << n) <= m) ++n;
  return n;
}
void NTT(vector<int> &f, int n, int lm, int opt) {
  for (int i = 0; i < n; ++i)
    if (i < tr[lm][i]) swap(f[i], f[tr[lm][i]]);
  for (int p = 2, tmp = 1, len = 1; p <= n; p <<= 1, len <<= 1, ++tmp)
    for (int j = 0; j < n; j += p)
      for (int k = j, t1, t2; k < j + len; ++k) {
        t1 = f[k], t2 = 1ll * f[k + len] *
                        (opt == 1 ? yg[tmp][k - j] : yg2[tmp][k - j]) % mod;
        f[k] = Mod(t1 + t2), f[k + len] = Mod(t1 - t2 + mod);
      }
  if (!opt)
    for (int i = 0, invn = Ksm(n, mod - 2); i < n; ++i)
      f[i] = 1ll * f[i] * invn % mod;
}
vector<int> operator*(vector<int> a, vector<int> b) {
  int n0 = a.size() + b.size() - 1, lm = Init(n0), limit = 1 << lm;
  if (n0 < 70) {
    vector<int> c;
    c.resize(n0);
    for (int i = 0; i < a.size(); i++)
      for (int j = 0; j < b.size(); j++)
        c[i + j] = (c[i + j] + 1ll * a[i] * b[j]) % mod;
    return c;
  }
  a.resize(limit), b.resize(limit);
  NTT(a, limit, lm, 1), NTT(b, limit, lm, 1);
  for (int i = 0; i < limit; ++i) a[i] = 1ll * a[i] * b[i] % mod;
  NTT(a, limit, lm, 0), a.resize(n0);
  return a;
}
vector<int> operator+(vector<int> a, vector<int> b) {
  a.resize(max(a.size(), b.size()));
  for (int i = 0, siz = b.size(); i < siz; ++i) a[i] = Mod(a[i] + b[i]);
  return a;
}
}  // namespace Poly
using namespace Poly;
inline int read() {
  int s = 0, f = 0;
  char ch = getchar();
  while (ch < 48 || ch > 57) f = (ch == '-'), ch = getchar();
  while (ch > 47 && ch < 58)
    s = (s << 1) + (s << 3) + (ch ^ 48), ch = getchar();
  return f ? -s : s;
}
void Solve(int x) {
  for (int i = 1; i <= n; ++i) sum[i] = 0;
  for (int i = 1; i <= n; ++i)
    if (S[i] == x) ++sum[max(1, i - k)], --sum[min(n + 1, i + k + 1)];
  vector<int> f, g;
  f.resize(n), g.resize(m);
  for (int i = 1; i <= n; ++i) sum[i] += sum[i - 1], f[n - i] = (sum[i] > 0);
  for (int i = 1; i <= m; ++i) g[i - 1] = (T[i] == x);
  ans = ans + f * g;
}
int main() {
  scanf("%d%d%d%s%s", &n, &m, &k, S + 1, T + 1), Pre(524288);
  Solve('A'), Solve('G'), Solve('C'), Solve('T');
  for (int i = 0; i < m + n - 1; ++i)
    if (ans[i] == m) ++Ans;
  cout << Ans;
  return 0;
}
