#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>

int palindrom(char str1[81]);

int main(){

    char str[81];
    gets(str);

    int rez=0;

    char *p=strtok(str," ");

    while(p!=NULL)
    {
        rez+=palindrom(p);
        p=strtok(NULL," ");
    }


    printf("%d",rez);
}


int palindrom(char str[81])
{

    int i,j=0,k=0,duz=0,broj=0;
    char a[81];

    for (i=0;str[i]!='\0';i++){}

    while (i>=0)
    {
        a[j++]=str[--i];
    }

    a[j-1]='\0';

    duz=j-2;
    k=duz;
    j=duz;

    while (k>=0)
    {
       if (str[j]!=a[k]){
         broj++;
       }
       k--;
       j--;
    }
if(broj<1){
    return 1;
}
else
        return broj;
}