Palindrome
Time Limit: 1000 ms
Memory Limit: 65536 KiB
Problem Description
A string is said to be a palindrome if it reads the same both forwards and backwards, for example "madam" is a palindrome while "acm" is not.
Now we want to know how many palindrome strings in the given strings.
Now we want to know how many palindrome strings in the given strings.
Input
The first line of the input contains a single integer T, which indicates number of the given strings.
The next T lines contain one string S, whose length is less than 1000 letters.
The next T lines contain one string S, whose length is less than 1000 letters.
Output
One integer indicates the number of palindrome strings.
Sample Input
5 ababa aabb ab cccccc Abcd
Sample Output
2