#include<bits/stdc++.h>
using namespace std;

int main(){
	string sa;
	int ca=0;
	while(cin>>sa){
		//1~299/1~149\151~299
		string sb,sc;
		int a=sa.size();
		for(int i=0;i<(a+1)/2;i++){
			sb[i]=sa[i];
				}
			reverse(sa.begin(),sa.end());
			for(int i=0;i<(a+1)/2;i++){
				sc[i]=sa[i];
				}
				
				if(sb==sc){ca+=1;}
		}
		cout<<ca<<endl;
		return 0;
	}