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

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