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

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