#include <bits/stdc++.h>
using namespace std;

#define rep(i,n) for(int i=0;i<(n);++i)
#define loop for(;;)
#define trace(var) cerr<<">>> "<<#var<<" = "<<var<<endl;
#define inf (1e9)
#define eps (1e-9)

int main() {
  int ans = 0;
  loop {
    string s; cin >> s;
    if (not cin) break;
    bool res = true;
    for (int i = 0, n = s.size(); i*2 < n-1; ++i)
      if (s[i] != s[n-i-1]) res = false;
    if (res) ++ans;
  }
  cout << ans << endl;

  return 0;
}