#include <bits/stdc++.h>
using namespace std;
string s;
int split(int st, int ed) {
  int cnt[256] = {};
  for (int i = st; i < ed; ++i) {
    cnt[s[i]]++;
  }
  auto check = [&]() -> bool {
    int eo[2] = {};
    for (int c = 'a'; c <= 'z'; ++c) {
      ++eo[cnt[c] % 2];
    }
    return eo[1] <= 1;
  };
  if (check()) {
    return 1;
  }
  for (int i = ed - 1; i >= st; --i) {
    cnt[s[i]]--;
    if (check()) {
      return 1 + split(i, ed);
    }
  }
  return 0;
}
int main(int argc, char *argv[]) {
  cin >> s;
  int ans = split(0, (int)s.length());
  cout << ans << endl;
  return 0;
}
