#include <bits/stdc++.h>
using namespace std;
using ld = double;
ld _PI = acos(-1);
struct comp {
  ld r, i;
  comp(ld r, ld i) : r(r), i(i) {}
  comp operator+(const comp& oth) { return comp(r + oth.r, i + oth.i); }
  comp operator-(const comp& oth) { return comp(r - oth.r, i - oth.i); }
  comp operator*(const comp& oth) {
    return comp(r * oth.r - i * oth.i, r * oth.i + i * oth.r);
  }
  comp operator/(const ld o) { return comp(r / o, i / o); }
  bool operator==(const comp& oth) { return r == oth.r && i == oth.i; }
};
class _FFT {
 public:
  long long getLong(ld d) { return (long long)floor(d + 0.5); }
  void fft_init(vector<comp>& a, vector<comp>& b) {
    int n = (int)a.size(), i;
    if (n < (int)b.size()) n = (int)b.size();
    for (i = 30; i >= 0; i--)
      if ((1 << i) <= n) break;
    i += 2;
    n = (1 << i);
    a.resize(n, comp{0, 0});
    b.resize(n, comp{0, 0});
  }
  void printVector(const vector<comp>& a) {
    for (int i = 0; i < (int)a.size(); i++) {
      const comp& c = a[i];
      printf("%d(%lf, %lf)\n", i, c.r, c.i);
    }
    puts("");
  }
  vector<comp> additionPointValues(vector<comp>& a, vector<comp>& b) {
    int n = (int)a.size(), i;
    vector<comp> c(n, comp(0, 0));
    for (i = 0; i < n; i++) c[i] = a[i] + b[i];
    return c;
  }
  vector<comp> multiplyPointValues(vector<comp>& a, vector<comp>& b) {
    int n = (int)a.size(), i;
    vector<comp> c(n, comp(0, 0));
    for (i = 0; i < n; i++) c[i] = a[i] * b[i];
    return c;
  }
  vector<comp> brute_fft_inv(vector<comp>& a) {
    int n = (int)a.size(), i, j;
    vector<comp> c(n, comp(0, 0));
    comp wn(cos(2. * _PI / n), sin(2. * _PI / n));
    for (i = 0; i < n; i++) {
      for (j = 0; j < n; j++)
        c[i] = c[i] + a[j] * comp(cos(-j * i * 2. * _PI / n),
                                  sin(-j * i * 2. * _PI / n));
      c[i].r /= n;
      c[i].i /= n;
    }
    return c;
  }

 public:
  vector<comp> recursive_fft(vector<comp>& a) {
    int n = (int)a.size(), i, k;
    if (n == 1) return a;
    comp wn(cos(2. * _PI / n), sin(2. * _PI / n));
    comp w(1, 0);
    vector<comp> y0, y1;
    for (i = 0; i < n; i++) {
      if (i % 2)
        y1.push_back(a[i]);
      else
        y0.push_back(a[i]);
    }
    y0 = recursive_fft(y0);
    y1 = recursive_fft(y1);
    vector<comp> y(n, comp(0, 0));
    for (k = 0; k < n / 2; k++) {
      y[k] = y0[k] + w * y1[k];
      y[k + n / 2] = y0[k] - w * y1[k];
      w = w * wn;
    }
    return y;
  }
  vector<comp> recursive_fft_inv(vector<comp>& a) {
    int n = (int)a.size(), i, k;
    if (n == 1) return a;
    comp wn(cos(2. * _PI / n), -sin(2. * _PI / n));
    comp w(1, 0);
    vector<comp> y0, y1;
    for (i = 0; i < n; i++) {
      if (i % 2)
        y1.push_back(a[i]);
      else
        y0.push_back(a[i]);
    }
    y0 = recursive_fft_inv(y0);
    y1 = recursive_fft_inv(y1);
    vector<comp> y(n, comp(0, 0));
    for (k = 0; k < n / 2; k++) {
      y[k] = (y0[k] + w * y1[k]) / 2;
      y[k + n / 2] = (y0[k] - w * y1[k]) / 2;
      w = w * wn;
    }
    return y;
  }
  long long revIdx(int k, int n) {
    long long idx = 0;
    for (int i = 0; i < n; i++) {
      idx <<= 1LL;
      idx |= k % 2;
      k /= 2;
    }
    return idx;
  }
  vector<comp> bitReverseCopy(vector<comp>& a) {
    int n = (int)a.size(), lg;
    lg = log(n, 2);
    vector<comp> A(n, comp(0, 0));
    for (int i = 0; i < n; i++) A[revIdx(i, lg)] = a[i];
    return A;
  }
  int log(long long n, int base) {
    int lgn = 0;
    while (n) {
      lgn += 1;
      n /= base;
    }
    return lgn - 1;
  }
  vector<comp> iterative_fft(vector<comp>& a) {
    vector<comp> A = bitReverseCopy(a);
    int n = (int)a.size(), s, sLimit, m;
    sLimit = log(n, 2);
    for (s = 1; s <= sLimit; s++) {
      m = pow(2, s);
      comp wm(cos(2. * _PI / m), sin(2. * _PI / m));
      for (int k = 0; k < n; k += m) {
        comp w(1, 0);
        for (int j = 0; j < m / 2; j++) {
          comp t = w * A[k + j + m / 2];
          comp u = A[k + j];
          A[k + j] = u + t;
          A[k + j + m / 2] = u - t;
          w = w * wm;
        }
      }
    }
    return A;
  }
  vector<comp> iterative_fft_inv(vector<comp>& a) {
    vector<comp> A = bitReverseCopy(a);
    int n = (int)a.size(), s, sLimit, m;
    sLimit = log(n, 2);
    for (s = 1; s <= sLimit; s++) {
      m = pow(2, s);
      comp wm(cos(2. * _PI / m), -sin(2. * _PI / m));
      for (int k = 0; k < n; k += m) {
        comp w(1, 0);
        for (int j = 0; j < m / 2; j++) {
          comp t = w * A[k + j + m / 2];
          comp u = A[k + j];
          A[k + j] = (u + t) / 2;
          A[k + j + m / 2] = (u - t) / 2;
          w = w * wm;
        }
      }
    }
    return A;
  }
  template <class T>
  vector<comp> convolusion(vector<T>& a, vector<T>& b) {
    vector<comp> com_a(a.size(), comp(0, 0)), com_b(b.size(), comp(0, 0));
    int i;
    for (i = 0; i < (int)a.size(); i++) com_a[i].r = a[i];
    for (i = 0; i < (int)b.size(); i++) com_b[i].r = b[i];
    return convolusion(com_a, com_b);
  }
  vector<comp> convolusion(vector<comp>& a, vector<comp>& b) {
    vector<comp> dfta, dftb, c, mulab;
    fft_init(a, b);
    dfta = iterative_fft(a);
    dftb = iterative_fft(b);
    mulab = multiplyPointValues(dfta, dftb);
    c = iterative_fft_inv(mulab);
    return c;
  }
};
int gi(char c) {
  switch (c) {
    case 'A':
      return 0;
    case 'C':
      return 1;
    case 'G':
      return 2;
    case 'T':
      return 3;
  }
}
vector<int> res;
char S[200001], T[200001];
int SL, TL, k;
void apply(char c) {
  vector<int> s(SL, 0), t(TL, 0);
  int i, cur = -1e9;
  for (i = 0; i < SL; i++) {
    if (S[i] == c) {
      s[i] = 1;
      cur = i;
    } else if (i <= cur + k)
      s[i] = 1;
  }
  cur = 1e9;
  for (i = SL - 1; i >= 0; i--) {
    if (S[i] == c)
      cur = i;
    else if (cur - k <= i)
      s[i] = 1;
  }
  for (i = 0; i < TL; i++) t[i] = T[i] == c;
  _FFT fft;
  vector<comp> con = fft.convolusion(s, t);
  for (i = 0; i < SL; i++) {
    res[i] += fft.getLong(con[i].r);
  }
}
int main() {
  int i, ans = 0;
  const char* gc = "ACGT";
  scanf("%d%d%d\n%s%s", &SL, &TL, &k, S, T);
  res.resize(SL, 0);
  for (i = 0; i < TL / 2; i++) swap(T[i], T[TL - 1 - i]);
  for (i = 0; i < 4; i++) apply(gc[i]);
  for (i = 0; i < SL; i++) ans += res[i] >= TL;
  printf("%d", ans);
  return 0;
}
