#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  string abc = "abcdefghijklmnopqrstuvwxyz";
  cin >> s;
  long long int d[26] = {0};
  long long int d2[26] = {0};
  for (long long int i = 0; i < s.size(); i++) {
    for (int j = 0; j < 26; j++) {
      if (s[i] == abc[j]) {
        d[j]++;
        d2[j]++;
      }
    }
  }
  string s2 = s;
  long long int ans = 0;
  while (s2.size() > 0) {
    ans++;
    string s3 = s2;
    string s4 = "";
    string s5 = "";
    reverse(s3.begin(), s3.end());
    long long int sz = s2.size();
    for (long long int i = 0; i <= s3.size(); i++) {
      int p = 0;
      for (int j = 0; j < 26; j++) {
        if (d[j] % 2 != 0) {
          p++;
        }
      }
      if (p == 0) {
        break;
      } else if (p == 1 && sz % 2 == 1) {
        break;
      } else {
        s4 += s3[i];
        for (int j = 0; j < 26; j++) {
          if (s3[i] == abc[j]) {
            d[j]--;
          }
        }
        sz--;
      }
    }
    sz = s2.size();
    for (long long int i = 0; i <= s2.size(); i++) {
      int p = 0;
      for (int j = 0; j < 26; j++) {
        if (d2[j] % 2 != 0) {
          p++;
        }
      }
      if (p == 0) {
        break;
      } else if (p == 1 && sz % 2 == 1) {
        break;
      } else {
        s5 += s2[i];
        for (int j = 0; j < 26; j++) {
          if (s2[i] == abc[j]) {
            d2[j]--;
          }
        }
        sz--;
      }
    }
    if (s4.size() > s5.size()) {
      s4 = s5;
    }
    for (int i = 0; i < 26; i++) {
      d[i] = d2[i] = 0;
    }
    for (long long int i = 0; i < s4.size(); i++) {
      for (int j = 0; j < 26; j++) {
        if (s4[i] == abc[j]) {
          d[j]++;
          d2[j]++;
        }
      }
    }
    s2 = s4;
  }
  cout << ans << endl;
  return 0;
}
