#include <iostream>
#include <algorithm>
using namespace std;


int main(){
    string s, t;
    int n = 0;
    while (cin >> s){
	t = s;
	reverse(s.begin(), s.end());
	if (s == t) n++;
    }
    cout << n << endl;
}