#include <iostream>
#include <bits/stdc++.h>


using namespace std;
bool checkPalindrome(string str){

    int n = str.length();

    // Counting number of characters
    // that should be changed.
    int count = 0;
    for (int i = 0; i < n/2; ++i)
        if (str[i] != str[n - i - 1])
            ++count;

    // If count of changes is less than
    // or equal to 1
    return (count <= 1);
}
char maximum(const vector<int>& vec){
   int high = 0;
   char c;
   for(int i = 0; i < 26; i++){
      if(vec[i] > high){
         high = vec[i];
         c = 'a' + i;
      }
   }
   return c;
}
string Rearrangement(string str, int length){
   int size = (length + 1) / 2;
   vector<int> vec(26, 0);
   string ptr(length, ' ');
   int temp = 0;
   for(auto it : str){
      vec[it - 'a']++;
   }
   char ch = maximum(vec);
   int total = vec[ch - 'a'];
   if(total > size){
      return "";
   }
   while(total){
      ptr[temp] = ch;
      temp = temp + 2;
      total--;
   }
   vec[ch - 'a'] = 0;
   for(int i = 0; i < 26; i++){
      while (vec[i] > 0){
         temp = (temp >= length) ? 1 : temp;
         ptr[temp] = 'a' + i;
         temp = temp + 2;
         vec[i]--;
      }
   }
   return ptr;
}
string ponovljeni(string str,int length)
{
    int arr[256]={0},i;
    string pocetak, sredina;
    for(i=0;i<length;i++)
    {
        if(str[i]==' ')
            continue;
            arr[str[i]]++;
    }

        for(i=0;i<256;i++)
    {
        if(arr[i]>1)
        {
          pocetak.append(arr[i]/2,(char)(i));
        }
        else
            sredina.append(arr[i],(char)(i));
    }
    int n = pocetak.length();
    pocetak = Rearrangement(pocetak,n);
    string kraj = pocetak;
    reverse(kraj.begin(),kraj.end());
return pocetak + sredina + kraj;
}
 int prebroj(string str,string str2,int length)
 {
     int br=0;
     for(int i = 0; i < length;i++)
        if(str[i]!=str2[i])
         br++;
     return br+1;
 }

int main()
{
       string str;
       cin >> str;
    int length= str.length();
    //string z= getPalindrome(str);
    string str2 = ponovljeni(str,length);
    if (checkPalindrome(str))
       cout << 1 << endl;
    else

    cout << prebroj(str,str2,length);

    return 0;
}