#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

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

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

    return 0;
}