import sys



s = []

for line in sys.stdin:

    line = line.strip()

    if line == line[::-1]:

        s.append(line)

print((len(s)))
ans = 0

while True:

    try:

        string = eval(input())

    except:

        break

    ans += [0, 1][string == string[::-1]]

print(ans)



import sys

s = []
for line in sys.stdin:
    line = line.strip()
    if line == line[::-1]:
        s.append(line)
print((len(s)))

ans = 0
while True:
    try:
        string = eval(input())
    except:
        break
    ans += [0, 1][string == string[::-1]]
print(ans)

-import sys - -s = [] -for line in sys.stdin: -    line = line.strip() -    if line == line[::-1]: -        s.append(line) -print((len(s))) +ans = 0 +while True: +    try: +        string = eval(input()) +    except: +        break +    ans += [0, 1][string == string[::-1]] +print(ans)