#include <cstring>
#include <iostream>

using namespace std;

int main()
{
	char S[100], c = 0;

	while (cin >> S)
	{
		c++;

		for (int i = 0; i < strlen(S); i++)
		{
			if (S[i] != S[strlen(S) - i - 1]) { c--; goto Exit; }
		}

	Exit:;
	}

	cout << c << endl;
}