#include using namespace std; #include using namespace atcoder; int main () { int N, M, K; cin >> N >> M >> K; string s, t; cin >> s >> t; string x = t + s; auto v = z_algorithm(x); std::vector s1(N, 0), s2(N, 0), t1(M, 0), t2(M, 0); for (int i = 0; i < N; i ++) { ('A' <= s[i] && s[i] <= 'Z' ? s1 : s2)[i] ++; } for (int i = 0; i < M; i ++) { ('A' <= t[i] && t[i] <= 'Z' ? t1 : t2)[M - i + 1] ++; } auto c1 = convolution(s1, t2); auto c2 = convolution(s2, t1); int ans = 0; for (int i = 0; i + M <= N; i ++) { int c = (c1[i + M - 1] + c2[i + M - 1]); ans += ((v[i + M] >= M) && (1 <= c) && (c <= K)); } cout << ans << endl; }