#import <Foundation/Foundation.h>

int main(int argc, char **argv) {
  char *str;
  scanf("%s", str);
  int len = 0;
  int i = 0;
  int j = sizeof(str) / sizeof(char) - 1;
  while(i<j) {
    if (str[i]==str[j]) {
      len += 1;
    }
    i++; j--;
  }
  printf("%d", len);
  return 0;
  
}