#include <iostream>
#include <vector>

using namespace std;

int main(){

    string rec;

    cin>>rec;
    int brojslova = rec.length();
    int duzina = rec.length();

    for(int i = 0; i<duzina/2; i++){
        if(rec[i]==rec[rec.length()-i-1]){
            brojslova -= 2;
        }else{
            for(int j = rec.length()-i-1; j>i; j--){
                if(rec[i]==rec[j])
                    brojslova -= 1;
            }
        }
    }
    if(!brojslova)
        brojslova++;
    cout<<brojslova;
    return 0;
}