#include<iostream>
#include<cstdio>
#include<cstring>

int main(){
  char s1[101]={0};
  char s2[101]={0};
  int count=0;

  while(scanf("%s",s1)!=EOF){
    int len=strlen(s1);
    for(int i=0;i<len;i++){
      s2[i]=s1[len-1-i];
    }
    if(strcmp(s1,s2)==0){
      count++;
    }
  }

  printf("%d\n",count);
  return(0);
}