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

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