#include <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#include <string>
#include <map>
#include <functional>
#include <cmath>
#include <cstdio>
using namespace std;

#define PI 4*atan(1)

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