#include<iostream>
#include<string>

using namespace std;

int main(){
  string s;
  int sum  = 0;
  bool f = true;
  while(cin >> s){
    f = true;
    for(int i = 0;i < s.size()/2;i++){
      if(s[i] != s[s.size()-1-i]){
	f = false;
	//break;
      }
      
    }
    if(f)
	sum++;
    
    
    //cout << sum << endl;
  }
  cout << sum << endl;
}