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

bool isPalindrome(string s) {
    int numberOfCheck = s.size() / 2;
    for (int i = 0; i < numberOfCheck; ++i)
        if (s[i] != s[s.size() - 1 - i])
            return false;
    return true;
}

int main()
{

    string s;
    int cnt = 0;
    while (getline(cin, s)) {
        if (isPalindrome(s))
            cnt++;
    }
    cout << cnt << endl;

    return 0;
}
