#include<iostream>
#include<string>
using namespace std;
int main() {
	string str;
	int sum = 0;
	while (cin >> str){
		if (str.size() % 2 == 0) {
			for (int i = 0; i != str.size() / 2; i++){
				if (str[i] != str[str.size() - i])continue;
			}
		}else{
			for (int i = 0; i != str.size() / 2 - 1; i++){
				if (str[i] != str[str.size() - i])continue;
			}
		}
		sum++;
	}
	cout << sum << endl;
	char c;
	cin >> c;
}