#include<iostream>
#include<string>

using namespace std;

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