#include <bits/stdc++.h>

std::string s;
int res;

int is_palindrome( std::string s ) {
    std::string t = s;
    std::reverse(t.begin(), t.end());
    return t == s;
}

int main() {
    while (std::cin >> s) {
        res += is_palindrome( s );
    }
    std::cout << res << std::endl;
    return 0;
}

