#include<iostream>
#include<string>

using namespace std;



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

}