#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
	string s,ss;
	int sum = 0;
	while(cin >>s){
		ss = s;
		reverse(s.begin(),s.end());
		if(s == ss){sum++;}
	}
	cout<<sum<<endl;
	return 0;
}