#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
constexpr double PI = 3.1415926535897932384626433;
constexpr int N = (1 << 19);
class Complex {
  using CpxType = double;
  CpxType re;
  CpxType im;

 public:
  Complex() : re(0), im(0) {}
  Complex(CpxType _re, CpxType _im) : re(_re), im(_im) {}
  Complex operator+(const Complex &other) const {
    return Complex(re + other.re, im + other.im);
  }
  Complex &operator+=(const Complex &other) { return *this = *this + other; }
  Complex operator-(const Complex &other) const {
    return Complex(re - other.re, im - other.im);
  }
  Complex &operator-=(const Complex &other) { return *this = *this - other; }
  Complex operator*(const Complex &other) const {
    return Complex(re * other.re - im * other.im,
                   re * other.im + im * other.re);
  }
  Complex &operator*=(const Complex &other) { return *this = *this * other; }
  CpxType real() { return re; }
  CpxType imag() { return im; }
};
inline unsigned rev_bits(unsigned val, int num_bits) {
  unsigned mask = 0x0000FFFF;
  val = ((val & mask) << 16u) | ((val >> 16u) & mask);
  mask = 0x00FF00FF;
  val = ((val & mask) << 8u) | ((val >> 8u) & mask);
  mask = 0x0F0F0F0F;
  val = ((val & mask) << 4u) | ((val >> 4u) & mask);
  mask = 0x33333333;
  val = ((val & mask) << 2u) | ((val >> 2u) & mask);
  mask = 0x55555555;
  val = ((val & mask) << 1u) | ((val >> 1u) & mask);
  return (val >> (32u - num_bits));
}
void FFT(Complex a[], int log, bool inv, int rev[]) {
  int n = (1 << log);
  for (int i = 0; i < n; i++) {
    if (i < rev[i]) {
      swap(a[i], a[rev[i]]);
    }
  }
  for (int step = 2; step <= n; step *= 2) {
    double angle = (inv ? -1 : 1) * 2 * PI / step;
    Complex nthRoot = Complex(cos(angle), sin(angle));
    auto *unityRoots = new Complex[step / 2];
    unityRoots[0] = Complex(1, 0);
    for (int i = 1; i < step / 2; i++) {
      unityRoots[i] = unityRoots[i - 1] * nthRoot;
    }
    for (int k = 0; k < n; k += step) {
      for (int i = 0; i < step / 2; i++) {
        Complex pom1 = a[i + k];
        Complex pom2 = unityRoots[i] * a[i + k + step / 2];
        a[i + k] = pom1 + pom2;
        a[i + k + step / 2] = pom1 - pom2;
      }
    }
    delete[] unityRoots;
  }
  if (inv) {
    for (int i = 0; i < n; i++) {
      a[i] *= Complex(1.0 / n, 0);
    }
  }
}
int n, m, k;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n >> m >> k;
  char *text = new char[n + 1];
  char *pattern = new char[m + 1];
  cin >> text >> pattern;
  int newSize = 1, logSize = 0;
  while (newSize <= n + m) newSize *= 2, logSize++;
  int *A = new int[n];
  int *B = new int[m];
  int *rev = new int[newSize];
  auto *C = new Complex[newSize];
  auto *ans = new Complex[newSize];
  for (int i = 0; i < newSize; i++) {
    rev[i] = rev_bits(i, logSize);
    ans[i] = Complex(0, 0);
  }
  for (auto c : {'A', 'C', 'T', 'G'}) {
    int cnt = 0;
    for (int i = -k; i < n; i++) {
      if (i + k < n && text[i + k] == c) cnt++;
      if (i >= 0) A[i] = ((cnt > 0) ? 1 : 0);
      if (i >= k && text[i - k] == c) cnt--;
    }
    for (int i = m - 1; i >= 0; i--) {
      B[m - 1 - i] = ((pattern[i] == c) ? 1 : 0);
    }
    for (int i = 0; i < newSize; i++) {
      int a = (i < n ? A[i] : 0);
      int b = (i < m ? B[i] : 0);
      C[i] = Complex((a + b) / 2.0, (b - a) / 2.0);
    }
    FFT(C, logSize, false, rev);
    for (int i = 0; i < newSize; i++) {
      ans[i] += C[i] * C[i];
    }
  }
  FFT(ans, logSize, true, rev);
  int cntAns = 0;
  for (int i = 0; i < n; i++) {
    if (ans[i].real() + 0.5 > m) {
      cntAns++;
    }
  }
  printf("%d\n", cntAns);
  return 0;
}
