#include <bits/stdc++.h>

using namespace std;

int main() {
    int ans = 0;
    string s, rvs;
    while (cin >> s) {
        rvs = s;
        reverse(rvs.begin(), rvs.end());
        if (s == rvs) ans++;
    }

    cout << ans << endl;

    return 0;
}
