#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
 
#define INPUT_FROM_FILE (0) 
#if INPUT_FROM_FILE
#include <fstream>
#endif
 
int main(){
	std::string buf;
	std::string rbuf;
	int counter = 0;


#if INPUT_FROM_FILE
	std::ifstream ifs("test.txt");
	//FILE *fp = fopen("test.txt", "r");
#endif

#if INPUT_FROM_FILE
	while(std::getline(ifs, buf)){
#else
	while(std::getline(std::cin, buf)){
#endif
		rbuf = buf;
		std::reverse(rbuf.begin(), rbuf.end());
			
		if(buf == rbuf){
			counter++;
		}
	}
 
	std::cout << counter << std::endl;

#if INPUT_FROM_FILE
	//fclose(fp);
#endif
    return 0;
}
