#include <iostream>
#include <string>

using namespace std;

int main() {
  string s;
  int cnt = 0;

  while (cin >> s) {
    bool flag = true;
    for (int i = 0; i < s.length(); ++i)
      if (s[i] != s[s.length()-i-1])
        flag = false;

    cnt += int(flag);
  }

  cout << cnt << endl;
}
