#include <iostream>
#include <string.h>
#include <cstdio>
using namespace std;
int main(void) {
  char s1[101], s2[101];
  int len, cmp, cnt=0;
  while(scanf("%s", s1) != EOF) {
    len = strlen(s1);
    for(int i = 0 ; i < len ; i++) {
      s2[len-i-1] = s1[i];
    }
    cmp = strcmp(s1, s2);
    if(cmp == 0) cnt++;
  }
  cout << cnt << endl;
  //printf("%s %s\n", s1, s2);
  return 0;
}