#include <algorithm>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <cctype>
#include <iostream>
#include <set>
#include <string>
#include <queue>
#include <map>
#include <utility>
using namespace std;
int size(string x){
	string::size_type size=x.size();
	return size;
}
#define fu(l,k) for(int i=l;i<k;i++)
#define fd(l,k) for(int i=l;i>k;i--)
#define sort(ss) sort(ss.begin(), ss.end())
#define rsort(ss) sort(ss.rbegin(), ss.rend())
typedef  vector<string> vs;
typedef  vector<int> vi;
double pi(){
	return M_PI;
}
typedef set<int> set_i;
typedef set<string> set_s;
int INF=1000000;
int main(){
	string s;
	int a,ans,q,qq;
	while(cin>>s){
		a=size(s);
		q=0;
		qq=0;
		for(int i=0;i<a;i++){
			if(s[i]==s[a-i-1]) q++;
			if(i==a-i-1||i-(a-i-1)==0){
				qq=i;
				break;
			}
		}
		if(q==qq) ans++;
	}
	cout<<ans<<endl;
}