#include <iostream>
#include <cstring>
#include <string>
using namespace std;

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