#include <bits/stdc++.h>
using namespace std;
template <class X, class Y>
void amin(X& x, const Y& y) {
  if (x > y) x = y;
}
template <class X, class Y>
void amax(X& x, const Y& y) {
  if (x < y) x = y;
}
const int INF = 1e9 + 10;
const long long INFL = (long long)1e18 + 10;
const string D = "ATGC";
const int MAX = 2e5 + 10;
int n, m, k;
string s, t;
int mark[MAX];
int conv(char c) {
  for (int i = 0; i < (int(D.size())); i++)
    if (D[i] == c) return i;
  return -1;
}
void process() {
  cin >> n >> m >> k;
  cin >> s >> t;
  bitset<MAX> ans;
  for (int i = 0; i < n; i++) ans[i] = 1;
  for (int c = 0; c < 4; c++) {
    memset(mark, 0, sizeof(mark));
    for (int i = 0; i < n; i++)
      if (conv(s[i]) == c) {
        mark[max(0, i - k)] += 1;
        mark[min(n, i + k + 1)] += -1;
      }
    bitset<MAX> y;
    for (int i = 0, s = 0; i < n; i++) {
      s += mark[i];
      y[i] = bool(s);
    }
    for (int i = 0; i < m; i++)
      if (conv(t[i]) == c) {
        ans &= y >> i;
      }
  }
  cout << ans.count();
}
int main() {
  ios_base::sync_with_stdio(false);
  process();
}
