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

int main()
{
    int sum = 0;
    string str;

    while( cin >> str )
    {
        string palindrome = "";
        for( int i = str.size() - 1; i >= 0; i-- )
            palindrome += str[i];
        if( str == palindrome )
            sum++;
    }
    cout << sum << endl;

    return 0;
}
