#include<iostream>
#include<string>
using namespace std;
int main() {
	string a,b;
	int ans = 0;
	int x;
	while (cin >> a) {
		b = "";
		x = 0;
		for (int i = a.size() - 1; i >=0 ; i--) {
			b = b+a[i];
		}
		if (a == b) {
			ans = ans + 1;
		}
	}
	cout << ans << endl;
}
