#include <bits/stdc++.h>
using namespace std;
const int INF = 2000000005;
const long long INFLL = 1000000000000000002ll;
const long long MOD = 1000000007;
inline long long min(long long a, long long b, long long c) {
  return min(min(a, b), c);
}
inline long long min(long long a, long long b, long long c, long long d) {
  return min(min(min(a, b), c), d);
}
inline long long max(long long a, long long b, long long c) {
  return max(max(a, b), c);
}
inline long long max(long long a, long long b, long long c, long long d) {
  return max(max(max(a, b), c), d);
}
const double PI = acos(0) * 2;
const complex<double> J(0, 1);
class FFT {
 public:
  static vector<int> multiply(vector<int> &a, vector<int> &b) {
    vector<complex<double>> va, vb;
    for (int x : a) va.push_back(x);
    for (int x : b) vb.push_back(x);
    return convolve(va, vb);
  }
  static vector<int> convolve(vector<complex<double>> &a,
                              vector<complex<double>> &b) {
    int n;
    for (n = 1; n < a.size() || n < b.size(); n *= 2)
      ;
    n *= 2;
    a.resize(n), b.resize(n);
    vector<int> r(n);
    transform(a, false);
    transform(b, false);
    for (int i = 0; i < n; i++) a[i] *= b[i];
    transform(a, true);
    for (int i = 0; i < n; i++) r[i] = int(a[i].real() + 0.5);
    return r;
  }

 private:
  static void transform(vector<complex<double>> &a, bool inv = false) {
    int n = a.size();
    if (n == 1) return;
    for (int i = 1, rv = 0; i < n; i++) {
      int j = n / 2;
      for (; rv >= j; j /= 2) rv -= j;
      rv += j;
      if (i < rv) swap(a[i], a[rv]);
    }
    for (int l = 2; l <= n; l *= 2) {
      double alpha = 2 * PI / l;
      if (inv) alpha = -alpha;
      for (int i = 0; i < n; i += l) {
        complex<double> w(1), wn(cos(alpha), sin(alpha));
        for (int j = 0; j < l / 2; j++) {
          complex<double> x = a[i + j];
          complex<double> y = w * a[i + j + l / 2];
          a[i + j] = x + y;
          a[i + j + l / 2] = x - y;
          w *= wn;
        }
      }
    }
    if (inv)
      for (int i = 0; i < n; i++) a[i] /= n;
  }
};
int A[200005], All[4], B[200005], M, N, K, S[200005][4], T[200005][4];
map<char, int> Map;
string StrS, StrT;
vector<int> DA[4], DB[4], DC[4];
int main() {
  Map['A'] = 0;
  Map['C'] = 1;
  Map['G'] = 2;
  Map['T'] = 3;
  cin >> N >> M >> K;
  cin >> StrS >> StrT;
  for (int i = (0); i <= (N - 1); i++) A[i] = Map[StrS[i]];
  for (int i = (0); i <= (M - 1); i++) B[i] = Map[StrT[i]];
  for (int i = (0); i <= (N - 1); i++) {
    int l = max(i - K, 0);
    int r = min(i + K, N - 1);
    int c = A[i];
    S[l][c]++, S[r + 1][c]--;
  }
  for (int i = (1); i <= (N - 1); i++)
    for (int c = (0); c <= (3); c++) S[i][c] += S[i - 1][c];
  for (int i = (0); i <= (N - 1); i++)
    for (int c = (0); c <= (3); c++) S[i][c] = min(S[i][c], 1);
  for (int i = (0); i <= (M - 1); i++) {
    int c = B[i];
    T[i][c] = 1;
  }
  for (int i = (0); i <= (N - 1); i++)
    for (int c = (0); c <= (3); c++) DA[c].push_back(S[i][c]);
  for (int i = (0); i <= (M - 1); i++)
    for (int c = (0); c <= (3); c++) DB[c].push_back(T[i][c]);
  for (int c = (0); c <= (3); c++) reverse(DB[c].begin(), DB[c].end());
  cout << setprecision(0) << fixed;
  for (int c = (0); c <= (3); c++) DC[c] = FFT::multiply(DA[c], DB[c]);
  for (int i = (0); i <= (M - 1); i++) {
    int c = B[i];
    All[c]++;
  }
  int to = ((int)DC[0].size());
  int ans = 0;
  for (int i = (0); i <= (to - 1); i++) {
    bool good = true;
    for (int c = (0); c <= (3); c++) good &= DC[c][i] >= (double)All[c] - 0.4;
    if (good) ans++;
  }
  cout << ans;
}
