#include <bits/stdc++.h>
using namespace std;
using PII = pair<int, int>;
using ll = long long;
int vs[300000];
int main(void) {
  string s;
  cin >> s;
  int n = s.size();
  int v = 0;
  for (int i = 0; i < (n); ++i) {
    v ^= (1 << (s[i] - 'a'));
    vs[i] = v;
  }
  for (int i = 0; i < (n); ++i) {
  }
  int ans = 0;
  queue<PII> q;
  q.push(PII(-1, 0));
  while (true) {
    int m = q.size();
    for (int i = 0; i < (m); ++i) {
      PII x = q.front();
      q.pop();
      int ind = x.first;
      int bef = x.second;
      int state = 0;
      if (ind != -1) state = vs[ind];
      for (int i = ind + 1; i < n; ++i) {
        int cnt = 0;
        cnt = __builtin_popcount(vs[i] ^ state);
        if (cnt <= 1) {
          q.push(PII(i, bef + 1));
          if (i == n - 1) {
            cout << bef + 1 << endl;
            return 0;
          }
        }
      }
    }
  }
  cout << "???" << endl;
  return 0;
}
