#include <iostream>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <cstdio>
#include <math.h>
#include <map>
#include <queue>
#include <string>
using namespace std;

int ans=0;
string s,t;

int main(){
	while(cin>>s){
		t=s;
		reverse(s.begin(),s.end());
		if(s==t)ans++;
	}
	cout<<ans<<endl;
}