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

bool check(string s,int begin,int end){
	if(begin>=end)return true;
	if(s[begin]==s[end])check(s,begin+1,end-1);
	else return false;
}

int main(){
	string ss;
	int num=0;
	while(cin>>ss){
		if(check(ss,0,ss.size()-1))num++;
	}
	cout<<num<<endl;
	return 0;
}