#include <iostream>
using namespace std;

int main() {
  int hit,size,ans=0;
  string str;
  while(cin >> str) {
    size = str.size();
    hit = 0;
    for(int i=0;i<(size-1)/2;i++) {
      if(str[i] == str[size-i-1])
        hit = 1;
      else {
        hit = 0;
        break;
      }
    }
    ans += hit;
  }
  cout << ans << endl;
}