import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
String q
= bufferedReader.
readLine(); String s
= bufferedReader.
readLine(); int l, r, flag=0, ans=0;
for(int i=0; i<s.length()-k+1; i++)
{
flag=0;
l=i;
r=i+k-1;
for(int j=0; j<k/2; j++)
{
if(s.charAt(l+j)!=s.charAt(r-j)){
flag=1;
break;
}
}
if(flag==0){
ans++;
}
}
}
}
aW1wb3J0IGphdmEuaW8uQnVmZmVyZWRSZWFkZXI7CmltcG9ydCBqYXZhLmlvLklPRXhjZXB0aW9uOwppbXBvcnQgamF2YS5pby5JbnB1dFN0cmVhbVJlYWRlcjsKIApwdWJsaWMgY2xhc3MgTWFpbiB7CiAgICBwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJpbmdbXSBhcmdzKSB0aHJvd3MgSU9FeGNlcHRpb257CiAgICAgICAgQnVmZmVyZWRSZWFkZXIgYnVmZmVyZWRSZWFkZXIgPSBuZXcgQnVmZmVyZWRSZWFkZXIobmV3IElucHV0U3RyZWFtUmVhZGVyKFN5c3RlbS5pbikpOwogICAgICAgIFN0cmluZyBxID0gYnVmZmVyZWRSZWFkZXIucmVhZExpbmUoKTsKICAgICAgICBpbnQgayA9IEludGVnZXIucGFyc2VJbnQocSk7CiAgICAgICAgU3RyaW5nIHMgPSBidWZmZXJlZFJlYWRlci5yZWFkTGluZSgpOwogICAgICAgIGludCBsLCByLCBmbGFnPTAsIGFucz0wOwoJCWZvcihpbnQgaT0wOyBpPHMubGVuZ3RoKCktaysxOyBpKyspCgkJewoJCQlmbGFnPTA7CgkJCWw9aTsKCQkJcj1pK2stMTsKCQkJZm9yKGludCBqPTA7IGo8ay8yOyBqKyspCgkJCXsKCQkJICAgIGlmKHMuY2hhckF0KGwraikhPXMuY2hhckF0KHItaikpeyAKCQkJICAgICAgICBmbGFnPTE7CgkJCSAgICAgICAgYnJlYWs7CgkJCSAgICB9CgkJCX0KCQkJaWYoZmxhZz09MCl7CgkJCSAgICBhbnMrKzsKCQkJfQoJCX0KCQlTeXN0ZW0ub3V0LnByaW50KGFucyk7CiAgICB9Cn0=