#include<iostream>
#include<string>
#include<algorithm>
using namespace std;

int main() {
  string s,t;
  int count = 0;
  while(cin>>s) {
    t = string(s);
    reverse(s.begin(), s.end());
    if(s == t) count++;
  }
  cout<<count<<endl;
}