#include <bits/stdc++.h>
using namespace std;

string T, pomT, palindrom;
int safl;

int main(){
        cin >> T;
        pomT = T;
        sort(T.begin(), T.end());

        for(int i = 0; i < T.length(); i++){
            if(i % 2 == 0){
                palindrom.push_back(T[T.length() - (i + 1)]);
            }
            else{
                palindrom.insert(0, 1, T[T.length()- i - 1]);
            }
        }

        for(int i = 0; i < pomT.length(); i++){
            if(pomT[i] != palindrom[i]){
                safl++;
            }
        }

        if(safl == 0){
            safl = 1;
        }

        cout << safl << endl;

    return 0;
}