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

int main() {
	string sa;
	int co = 0;
	while (cin >> sa) {
		int a = sa.size();
		string sb, sc;
		for (int i = 0; i < a / 2; i++) {
			sb[i] = sa[i];
		}
		int j = 0;
		for (int i = a; i > (a + 1) / 2; i--) {
			sc[j] = sa[i];
			j++;
		}
		if (sb == sc) { ++co; }
	}
	cout << co << endl;
	return 0;
}