#include <iostream>
#include <vector>
#include <list>
#include <algorithm>
#include <string>
#include <stack>
#include <iomanip>
#include <numeric>
#include <queue>
#include <climits>
#include <set>
#include <complex>
#include <cmath>
#include <map>
using namespace std;
using ll = long long;
#define MOD 1000000007
#define INF 1LL << 59

bool operator<(const pair<int, int> &a, const pair<int, int> &b)
{
    if (a.first == b.first)
    {
        return a.second < b.second;
    }
    return a.first < b.first;
}
int main()
{
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);
    //cout << fixed << setprecision(7);

    int cnt = 0;

    string s;
    while (cin >> s)
    {
        int n = s.size();
        bool f = true;
        if (n % 2 == 1)
        {
            for (int i = 0; i < n / 2; ++i)
            {
                if (s[i] == s[n - i - 1])
                    continue;
                else
                    f = false;
            }
        }
        else
        {
            for (int i = 0; i <= n / 2; ++i)
            {
                if (s[i] == s[n - i - 1])
                    continue;
                else
                    f = false;
            }
        }
        if (f)
            cnt++;

        if (cin.eof())
            break;
    }
    cout << cnt << endl;
    return 0;
}
