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

int main(){
	string str, str_rev;
	int cnt=0;
	while(cin>>str){
		str_rev = str;
		reverse(str_rev.begin(), str_rev.end());
		if(str == str_rev)cnt++;
	}
	cout<<cnt<<endl;
	return 0;
}