#include <bits/stdc++.h>
using namespace std;
int main(void) {
    string s;
    std::deque<char> front;
    std::deque<char> back;
    int count=0;
    while (cin>>s) {
        if (s.size()==1) {
            count++;
        } else {
            for (int i=0;i<(s.size()/2);i++) {
                front.emplace_back(s.at(i));
                back.emplace_back(s.at(s.size()-1-i));
            }
            if (front==back) {
                count++;
            }
            front.clear();
            back.clear();
        }
    }
    cout<<count<<endl;
}
