#include<map>
#include<set>
#include<list>
#include<cmath>
#include<queue>
#include<stack>
#include<cstdio>
#include<string>
#include<vector>
#include<complex>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<numeric>
#include<sstream>
#include<iostream>
#include<algorithm>
#include<functional>

using namespace std;

int main(){
	int cnt=0;
	int sum=0;
	string str;
	while(cin >> str){
		sum++;
		for(int i=0;i<str.size()/2;i++){
			if(str[i] != str[str.size()-i-1]){
				continue;
			}else{
				cnt++;
			}
		}
	}
	cout << cnt - sum << endl;
	return 0;
}