#include <algorithm>
#include <iostream>
#include <string>
int main(){
	char c;
	int a=0;
	std::string s,x;
	for(;std::cin>>s>>c;){
		x=s;
		reverse(x.begin(),x.end());
		if (x==s) a++;
	}
	std::cout<<a<<"\n";
}