#import int q,i,f,j;char s[999];main(){for(scanf("%*d%s",s);j--?:f=s[j=i++/2]>0;)q+=f*=s[j]==s[i+~j];printf("%d\n",q);}