#include <bits/stdc++.h>
using namespace std;
const int max_N = (1 << 20);
complex<double> eitheta(const long double &theta);
void FFT(complex<double> *in, complex<double> *out, int step, int sz, int dir);
void Mul(complex<double> *A, complex<double> *B, complex<double> *ans);
void match(int *store, char c);
void NaiveMul(complex<double> *A, complex<double> *B, complex<double> *ans);
int N, M, K;
int Nactual;
char S[max_N], T[max_N];
complex<double> Y1[max_N], Y2[max_N];
complex<double> sbit[max_N], tbit[max_N], ans[max_N];
int diff[max_N];
int matches[4][max_N];
int main() {
  memset(S, 0, sizeof(S));
  scanf("%d%d%d", &N, &M, &K);
  scanf("%s%s", S, T);
  Nactual = N;
  while (__builtin_popcount(N) != 1) {
    ++N;
  }
  const char *chars = "AGCT";
  for (int i = 0; i < 4; ++i) {
    match(matches[i], chars[i]);
  }
  int ans = 0;
  for (int i = 0; i < 2 * N; ++i) {
    int s = 0;
    for (int j = 0; j < 4; ++j) {
      s += matches[j][i];
    }
    ans += (s == M);
  }
  printf("%d\n", ans);
}
void FFT(complex<double> *in, complex<double> *out, int step, int sz, int dir) {
  if (sz < 1) {
    return;
  } else if (sz == 1) {
    out[0] = in[0];
  } else {
    auto omega_n = eitheta(2 * M_PI / sz * dir);
    complex<double> omega = 1;
    FFT(in, out, step * 2, sz / 2, dir);
    FFT(in + step, out + sz / 2, step * 2, sz / 2, dir);
    for (int k = 0; k < sz / 2; ++k) {
      auto even = out[k];
      auto odd = out[k + sz / 2];
      out[k] = even + omega * odd;
      out[k + sz / 2] = even - omega * odd;
      omega *= omega_n;
    }
  }
}
complex<double> eitheta(const long double &theta) {
  return complex<double>(cos(theta), sin(theta));
}
void Mul(complex<double> *A, complex<double> *B, complex<double> *ans) {
  for (int i = 0; i < 2 * N; ++i) {
    Y1[i] = 0;
    Y2[i] = 0;
    ans[i] = 0;
  }
  FFT(A, Y1, 1, 2 * N, 1);
  FFT(B, Y2, 1, 2 * N, 1);
  for (int i = 0; i < 2 * N; ++i) {
    Y1[i] *= Y2[i];
  }
  FFT(Y1, ans, 1, 2 * N, -1);
  for (int i = 0; i < 2 * N; ++i) {
    ans[i] /= (2 * N);
  }
}
void match(int *store, char c) {
  memset(diff, 0, sizeof(diff));
  for (int i = 0; i < Nactual; ++i) {
    if (S[i] == c) {
      diff[max(i - K, 0)] += 1;
      diff[min(N, i + K + 1)] -= 1;
    }
  }
  for (int i = 0; i < 2 * N; ++i) {
    sbit[i] = 0;
    tbit[i] = 0;
  }
  int run = 0;
  for (int i = 0; i < Nactual; ++i) {
    run += diff[i];
    sbit[i] = (run > 0);
  }
  for (int i = 0; i < M; ++i) {
    tbit[M - i - 1] = (T[i] == c);
  }
  Mul(sbit, tbit, ans);
  for (int i = 0; i < 2 * N; ++i) {
    store[i] = ans[i].real() + 0.5;
  }
}
void NaiveMul(complex<double> *A, complex<double> *B, complex<double> *ans) {
  for (int i = 0; i < 2 * N; ++i) {
    ans[i] = 0;
  }
  for (int i = 0; i < 2 * N; ++i) {
    for (int j = 0; j + i < 2 * N; ++j) {
      ans[i + j] += A[i] * B[j];
    }
  }
}
