#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
const double PI = acos(-1.0);
const int INF = 0x3f3f3f3f;
struct Complex {
  double x, y;
  Complex(double xx = 0.0, double yy = 0.0) {
    x = xx;
    y = yy;
  }
  Complex operator-(const Complex &b) const {
    return Complex(x - b.x, y - b.y);
  }
  Complex operator+(const Complex &b) const {
    return Complex(x + b.x, y + b.y);
  }
  Complex operator*(const Complex &b) const {
    return Complex(x * b.x - y * b.y, x * b.y + y * b.x);
  }
};
void change(Complex y[], int len) {
  int i, j, k;
  for (i = 1, j = len / 2; i < len - 1; i++) {
    if (i < j) swap(y[i], y[j]);
    k = len / 2;
    while (j >= k) {
      j -= k;
      k /= 2;
    }
    if (j < k) j += k;
  }
}
void fft(Complex y[], int len, int on) {
  change(y, len);
  for (int h = 2; h <= len; h <<= 1) {
    Complex wn(cos(-on * 2 * PI / h), sin(-on * 2 * PI / h));
    for (int j = 0; j < len; j += h) {
      Complex w(1, 0);
      for (int k = j; k < j + h / 2; k++) {
        Complex u = y[k];
        Complex t = w * y[k + h / 2];
        y[k] = u + t;
        y[k + h / 2] = u - t;
        w = w * wn;
      }
    }
  }
  if (on == -1)
    for (int i = 0; i < len; i++) y[i].x /= len;
}
Complex x1[4 * maxn], x2[4 * maxn];
char s[maxn], t[maxn];
int a[maxn];
int n, m, k;
long long sum[maxn];
void solve(char c) {
  int len = 1;
  for (len; len <= n + m; len *= 2)
    ;
  memset(a, 0, sizeof(a));
  for (int i = 0; i < n; i++)
    if (s[i] == c) {
      int l = max(0, i - k);
      int r = min(n, i + k + 1);
      a[l]++, a[r]--;
    }
  for (int i = 0; i < n; i++) {
    if (i) a[i] += a[i - 1];
    if (a[i])
      x1[i] = Complex(1, 0);
    else
      x1[i] = Complex(0, 0);
  }
  for (int i = n; i < len; i++) x1[i] = Complex(0, 0);
  for (int i = 0; i < m; i++)
    if (t[i] == c)
      x2[m - 1 - i] = Complex(1, 0);
    else
      x2[m - 1 - i] = Complex(0, 0);
  for (int i = m; i < len; i++) x2[i] = Complex(0, 0);
  fft(x1, len, 1);
  fft(x2, len, 1);
  for (int i = 0; i < len; i++) x1[i] = x1[i] * x2[i];
  fft(x1, len, -1);
  for (int i = m - 1; i < n; i++) sum[i] += (long long)(x1[i].x + 0.5);
}
int main() {
  int i, j;
  scanf("%d%d%d", &n, &m, &k);
  scanf("%s%s", s, t);
  solve('A');
  solve('C');
  solve('G');
  solve('T');
  int cnt = 0;
  for (i = m - 1; i < n; i++)
    if (sum[i] == m) cnt++;
  printf("%d\n", cnt);
  return 0;
}
