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

using namespace std;

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