#include <bits/stdc++.h>
using namespace std;
struct XX {
  long long x;
  long long y;
  long long ix;
  long long iy;
};
class xxGreater {
 public:
  bool operator()(const XX& riLeft, const XX& riRight) const {
    if ((riLeft.x) == (riRight.x)) {
      return riLeft.y < riRight.y;
    }
    return (riLeft.x) > (riRight.x);
  }
};
int main(int argc, const char* argv[]) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  string S;
  cin >> S;
  int a[26];
  int index = 0;
  int previndex = 0;
  int endindex = (int)S.size();
  int endprevindex = endindex - 1;
  int ans = 0;
  while (previndex <= endprevindex) {
    for (int i = 0; i < 26; i++) {
      a[i] = 0;
    }
    for (int i = previndex; i < endprevindex; i++) {
      a[*S.substr(i, 1).c_str() - 'a']++;
      int odd = 0;
      for (int j = 0; j < 26; j++) {
        if (a[j] % 2 != 0) {
          odd++;
        }
      }
      if (odd < 2) {
        index = i;
      }
    }
    for (int i = 0; i < 26; i++) {
      a[i] = 0;
    }
    for (int i = endprevindex; i >= previndex; i--) {
      a[*S.substr(i, 1).c_str() - 'a']++;
      int odd = 0;
      for (int j = 0; j < 26; j++) {
        if (a[j] % 2 != 0) {
          odd++;
        }
      }
      if (odd < 2) {
        endindex = i;
      }
    }
    if (index - previndex + 1 > endprevindex - endindex + 1) {
      index++;
      previndex = index;
    } else {
      endindex--;
      endprevindex = endindex;
    }
    ans++;
  }
  cout << ans << endl;
  return 0;
}
