#include<iostream>
#include<string>

using namespace std;

int main() {
	
	string A;
	int find = 0;
	
	while(cin >> A) {
		
		bool test = true;
		
		if(A.size() == 1)
			find++;
			
		else {
			
		for(int i=0;i<A.size()/2;i++) {
			
			if(A[i] != A[A.size()-1-i]) {
				
				test = false;
				break;
				
			}			
			
		}
			if(test)
				find++;
	}
}
		
		cout << find << "\n";
		
	return 0;
}
