#include <bits/stdc++.h>
using namespace std;
char _buf[100000], *_p1 = _buf, *_p2 = _buf;
inline int gi() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 3) + (x << 1) + (ch ^ 48);
    ch = getchar();
  }
  return (f == 1) ? x : -x;
}
inline int max(int a, int b) { return a > b ? a : b; }
inline int min(int a, int b) { return a < b ? a : b; }
const int maxn = 3e5 + 5;
namespace Poly {
const int mod = 998244353, g = 3;
vector<int> rev, roots;
inline void prep() { roots.push_back(0), roots.push_back(1); }
inline int qpow(int x, int k) {
  int ret = 1;
  while (k) {
    if (k & 1) ret = 1ll * ret * x % mod;
    x = 1ll * x * x % mod, k >>= 1;
  }
  return ret;
}
inline int getlen(int x) {
  int bit = 0;
  while ((1 << bit) < x) bit++;
  return 1 << bit;
}
inline void calcrev(int x) {
  if ((int)(rev.size()) == x) return;
  int bit = 0;
  while (1 << bit < x) bit++;
  x = 1 << bit;
  rev.resize(x);
  for (int i = 0; i <= x - 1; ++i)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (bit - 1));
  if ((int)(roots.size()) < x) {
    int l = (int)(roots.size());
    roots.resize(x);
    for (; l < x; l <<= 1) {
      int w = 1, wn = qpow(g, (mod - 1) / (2 * l));
      for (int j = 0; j < l; ++j) {
        roots[l + j] = w;
        w = 1ll * w * wn % mod;
      }
    }
  }
}
inline void dft(vector<int> &a) {
  int len = getlen((int)(a.size()));
  for (int i = 0; i <= len - 1; ++i)
    if (i < rev[i]) swap(a[i], a[rev[i]]);
  for (int l = 1; l < len; l <<= 1) {
    for (int i = 0; i < len; i += l << 1) {
      for (int j = 0; j < l; ++j) {
        int v1 = a[i + j], v2 = 1ll * a[i + j + l] * roots[j + l] % mod;
        a[i + j] = v1 + v2, a[i + j + l] = v1 - v2;
        if (a[i + j] >= mod) a[i + j] -= mod;
        if (a[i + j + l] < 0) a[i + j + l] += mod;
      }
    }
  }
}
inline void idft(vector<int> &a) {
  reverse(a.begin() + 1, a.end());
  dft(a);
  int inv = qpow((int)(a.size()), mod - 2);
  for (int i = 0; i <= (int)(a.size()) - 1; ++i) a[i] = 1ll * a[i] * inv % mod;
}
inline vector<int> operator+(vector<int> a, vector<int> b) {
  int len = max((int)(a.size()), (int)(b.size()));
  a.resize(len), b.resize(len);
  for (int i = 0; i <= len - 1; ++i)
    a[i] = a[i] + b[i], a[i] -= (a[i] >= mod) ? mod : 0;
  return a;
}
inline vector<int> operator-(vector<int> a, vector<int> b) {
  int len = max((int)(a.size()), (int)(b.size()));
  a.resize(len), b.resize(len);
  for (int i = 0; i <= len - 1; ++i)
    a[i] = a[i] - b[i], a[i] += (a[i] < 0) ? mod : 0;
  return a;
}
inline vector<int> operator*(vector<int> a, vector<int> b) {
  int len = (int)(a.size()) + (int)(b.size());
  len = getlen(len);
  a.resize(len), b.resize(len);
  calcrev(len);
  dft(a), dft(b);
  for (int i = 0; i <= len - 1; ++i) a[i] = 1ll * a[i] * b[i] % mod;
  idft(a);
  a.resize(len);
  return a;
}
}  // namespace Poly
using namespace Poly;
char s[maxn], t[maxn];
int n, m, k, cnt[maxn];
inline void init() { prep(); }
inline void input() {
  n = gi(), m = gi(), k = gi();
  scanf("%s%s", s, t);
}
bool vis[maxn];
inline void solve1(char x) {
  memset(vis, 0, sizeof(vis));
  vector<int> v1, v2;
  v1.resize(n), v2.resize(m);
  reverse(t, t + m);
  for (int i = 0; i <= n - 1; ++i) v1[i] = s[i] == x ? 1 : 2;
  for (int i = 0; i <= m - 1; ++i) v2[i] = t[i] == x ? 1 : 0;
  set<int> s;
  for (int i = 0; i <= n - 1; ++i)
    if (v1[i] == 1) s.insert(i);
  for (int i = 0; i <= n - 1; ++i) {
    auto it = s.lower_bound(i);
    if (it != s.end() && (*it) - i <= k) v1[i] = 1;
    if (it != s.begin()) {
      it--;
      if (i - (*it) <= k) v1[i] = 1;
    }
  }
  reverse(t, t + m);
  vector<int> v3 = v1;
  for (int i = 0; i <= n - 1; ++i) v3[i] = 1ll * v1[i] * v1[i] * v1[i] % mod;
  vector<int> v4 = v2;
  for (int i = 0; i <= m - 1; ++i) v4[i] = 1ll * v2[i] * v2[i] * v2[i] % mod;
  vector<int> ans = v1 * v4 + v2 * v3;
  vector<int> sum;
  vector<int> v5 = v1;
  for (int i = 0; i <= n - 1; ++i) v5[i] = 1ll * v1[i] * v1[i] * 2 % mod;
  vector<int> v6 = v2;
  for (int i = 0; i <= m - 1; ++i) v6[i] = 1ll * v2[i] * v2[i] % mod;
  sum = v5 * v6;
  ans = ans - sum;
  for (int i = m - 1; i <= n - 1; ++i) cnt[i - m + 1] += ans[i] == 0;
}
inline void solve() {
  int ans = 0;
  solve1('A'), solve1('C'), solve1('G'), solve1('T');
  for (int i = 0; i <= n - m + 1; ++i) ans += cnt[i] == 4;
  printf("%d\n", ans);
}
int main() {
  int T = 1;
  while (T--) {
    init();
    input();
    solve();
  }
  return 0;
}
