#include <iostream>
#include <cstring>
#include <cstdio>
using namespace std;

int main(){
	char str[100];
	int len;
	int c = 0;
	bool palindrome = false;
	
	while(scanf("%s", str) != EOF){
		len = strlen(str);
		for(int i = 0; i < len / 2; i++){
			if(str[i] != str[len - 1 - i]){
				palindrome = false;
				break;
			}
			palindrome = true;
		}
		if(palindrome == true){
			c++;
		}
	}
	
	cout << c << endl;
	
	return 0;
}