#include <bits/stdc++.h>
using namespace std;
constexpr int mod = 998244353;
std::vector<int> rev, roots{0, 1};
int powmod(int a, long long b) {
  int res = 1;
  for (; b; b >>= 1, a = 1ll * a * a % mod)
    if (b & 1) res = 1ll * res * a % mod;
  return res;
}
void dft(std::vector<int>& a) {
  int n = a.size();
  if (int(rev.size()) != n) {
    int k = __builtin_ctz(n) - 1;
    rev.resize(n);
    for (int i = 0; i < n; ++i) rev[i] = rev[i >> 1] >> 1 | (i & 1) << k;
  }
  for (int i = 0; i < n; ++i)
    if (rev[i] < i) std::swap(a[i], a[rev[i]]);
  if (int(roots.size()) < n) {
    int k = __builtin_ctz(roots.size());
    roots.resize(n);
    while ((1 << k) < n) {
      int e = powmod(3, (mod - 1) >> (k + 1));
      for (int i = 1 << (k - 1); i < (1 << k); ++i) {
        roots[2 * i] = roots[i];
        roots[2 * i + 1] = 1ll * roots[i] * e % mod;
      }
      ++k;
    }
  }
  for (int k = 1; k < n; k *= 2) {
    for (int i = 0; i < n; i += 2 * k) {
      for (int j = 0; j < k; ++j) {
        int u = a[i + j];
        int v = 1ll * a[i + j + k] * roots[k + j] % mod;
        int x = u + v;
        if (x >= mod) x -= mod;
        a[i + j] = x;
        x = u - v;
        if (x < 0) x += mod;
        a[i + j + k] = x;
      }
    }
  }
}
void idft(std::vector<int>& a) {
  int n = a.size();
  std::reverse(a.begin() + 1, a.end());
  dft(a);
  int inv = powmod(n, mod - 2);
  for (int i = 0; i < n; ++i) a[i] = 1ll * a[i] * inv % mod;
}
struct Poly {
  std::vector<int> a;
  Poly() {}
  Poly(int a0) {
    if (a0) a = {a0};
  }
  Poly(const std::vector<int>& a1) : a(a1) {
    while (!a.empty() && !a.back()) a.pop_back();
  }
  int size() const { return a.size(); }
  int operator[](int idx) const {
    if (idx < 0 || idx >= size()) return 0;
    return a[idx];
  }
  Poly mulxk(int k) const {
    auto b = a;
    b.insert(b.begin(), k, 0);
    return Poly(b);
  }
  Poly modxk(int k) const {
    k = std::min(k, size());
    return Poly(std::vector<int>(a.begin(), a.begin() + k));
  }
  Poly divxk(int k) const {
    if (size() <= k) return Poly();
    return Poly(std::vector<int>(a.begin() + k, a.end()));
  }
  friend Poly operator+(const Poly a, const Poly& b) {
    std::vector<int> res(std::max(a.size(), b.size()));
    for (int i = 0; i < int(res.size()); ++i) {
      res[i] = a[i] + b[i];
      if (res[i] >= mod) res[i] -= mod;
    }
    return Poly(res);
  }
  friend Poly operator-(const Poly a, const Poly& b) {
    std::vector<int> res(std::max(a.size(), b.size()));
    for (int i = 0; i < int(res.size()); ++i) {
      res[i] = a[i] - b[i];
      if (res[i] < 0) res[i] += mod;
    }
    return Poly(res);
  }
  friend Poly operator*(Poly a, Poly b) {
    int sz = 1, tot = a.size() + b.size() - 1;
    while (sz < tot) sz *= 2;
    a.a.resize(sz);
    b.a.resize(sz);
    dft(a.a);
    dft(b.a);
    for (int i = 0; i < sz; ++i) a.a[i] = 1ll * a[i] * b[i] % mod;
    idft(a.a);
    return Poly(a.a);
  }
  Poly& operator+=(Poly b) { return (*this) = (*this) + b; }
  Poly& operator-=(Poly b) { return (*this) = (*this) - b; }
  Poly& operator*=(Poly b) { return (*this) = (*this) * b; }
  Poly deriv() const {
    if (a.empty()) return Poly();
    std::vector<int> res(size() - 1);
    for (int i = 0; i < size() - 1; ++i)
      res[i] = 1ll * (i + 1) * a[i + 1] % mod;
    return Poly(res);
  }
  Poly integr() const {
    if (a.empty()) return Poly();
    std::vector<int> res(size() + 1);
    for (int i = 0; i < size(); ++i)
      res[i + 1] = 1ll * a[i] * powmod(i + 1, mod - 2) % mod;
    return Poly(res);
  }
  Poly inv(int m) const {
    Poly x(powmod(a[0], mod - 2));
    int k = 1;
    while (k < m) {
      k *= 2;
      x = (x * (2 - modxk(k) * x)).modxk(k);
    }
    return x.modxk(m);
  }
  Poly log(int m) const { return (deriv() * inv(m)).integr().modxk(m); }
  Poly exp(int m) const {
    Poly x(1);
    int k = 1;
    while (k < m) {
      k *= 2;
      x = (x * (1 - x.log(k) + modxk(k))).modxk(k);
    }
    return x.modxk(m);
  }
  Poly mulT(Poly b) const {
    if (b.size() == 0) return Poly();
    int n = b.size();
    std::reverse(b.a.begin(), b.a.end());
    return ((*this) * b).divxk(n - 1);
  }
  std::vector<int> eval(std::vector<int> x) const {
    if (size() == 0) return std::vector<int>(x.size(), 0);
    const int n = std::max(int(x.size()), size());
    std::vector<Poly> q(4 * n);
    std::vector<int> ans(x.size());
    x.resize(n);
    std::function<void(int, int, int)> build = [&](int p, int l, int r) {
      if (r - l == 1) {
        q[p] = std::vector<int>{1, (mod - x[l]) % mod};
      } else {
        int m = (l + r) / 2;
        build(2 * p, l, m);
        build(2 * p + 1, m, r);
        q[p] = q[2 * p] * q[2 * p + 1];
      }
    };
    build(1, 0, n);
    std::function<void(int, int, int, const Poly&)> work =
        [&](int p, int l, int r, const Poly& num) {
          if (r - l == 1) {
            if (l < int(ans.size())) ans[l] = num[0];
          } else {
            int m = (l + r) / 2;
            work(2 * p, l, m, num.mulT(q[2 * p + 1]).modxk(m - l));
            work(2 * p + 1, m, r, num.mulT(q[2 * p]).modxk(r - m));
          }
        };
    work(1, 0, n, mulT(q[1].inv(n)));
    return ans;
  }
};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int n, m, k;
  string s1, s2;
  cin >> n >> m >> k >> s1 >> s2;
  reverse(s2.begin(), s2.end());
  vector<char> st;
  vector<int> cnt(n - m + 1, 0);
  for (auto c : s1) st.push_back(c);
  for (auto c : s2) st.push_back(c);
  sort(st.begin(), st.end());
  st.erase(unique(st.begin(), st.end()), st.end());
  auto sol = [&](string s1, string s2, char ch) {
    vector<int> va(n, 0);
    vector<int> vb(m, 0);
    vector<pair<int, int> > sa;
    vector<pair<int, int> > sb;
    for (int i = 0; i < n; i++) {
      if (s1[i] == ch) {
        int l = max(0, i - k);
        int r = min(n - 1, i + k);
        sa.push_back({l, r});
      }
    }
    if (!sa.empty()) {
      auto p = *sa.begin();
      for (int i = 1; i < (int)sa.size(); i++) {
        if (sa[i].first <= p.second) {
          p.second = sa[i].second;
        } else {
          sb.push_back(p);
          p = sa[i];
        }
      }
      sb.push_back(p);
      for (auto s : sb) {
        for (int i = s.first; i <= s.second; i++) {
          va[i] = 1;
        }
      }
      for (int i = 0; i < m; i++) {
        if (s2[i] == ch) {
          vb[i] = 1;
        }
      }
      Poly pa(va);
      Poly pb(vb);
      pa *= pb;
      for (int i = m - 1; i <= n - 1; i++) cnt[i - m + 1] += pa[i];
    }
  };
  for (auto c : st) sol(s1, s2, c);
  vector<int> res;
  for (int i = 0; i <= n - m; i++) {
    if (cnt[i] == m) {
      res.push_back(i + 1);
    }
  }
  cout << (int)res.size() << '\n';
  return 0;
}
