#include <bits/stdc++.h>
using namespace std;
void _dbg(string) { cout << endl; }
template <class H, class... T>
void _dbg(string s, H h, T... t) {
  int l = s.find(',');
  cout << s.substr(0, l) << " = " << h << ", ";
  _dbg(s.substr(l + 1), t...);
}
template <class T, class U>
ostream &operator<<(ostream &o, const pair<T, U> &p) {
  o << "(" << p.first << "," << p.second << ")";
  return o;
}
template <class T>
ostream &operator<<(ostream &o, const vector<T> &v) {
  o << "[";
  for (T t : v) {
    o << t << ",";
  }
  o << "]";
  return o;
}
int solve(string &s) {
  int n = s.size();
  vector<int> ma(n + 1);
  int mask = 0;
  map<int, int> pos;
  for (int i = (int)(0); i < (int)(n); i++) {
    mask = mask ^ (1 << (s[i] - 'a'));
    ma[i + 1] = mask;
    pos[mask] = i + 1;
  }
  vector<int> dp(n + 1, 1120000000);
  dp[0] = 0;
  for (int p = (int)(0); p < (int)(n); p++) {
    for (int i = (int)(0); i < (int)(26); i++) {
      int nm = ma[p] ^ (1 << i);
      if (pos.count(nm) == 0) continue;
      int x = pos[nm];
      dp[x] = min(dp[x], dp[p] + 1);
    }
    if (pos.count(ma[p])) {
      int x = pos[ma[p]];
      dp[x] = min(dp[x], dp[p] + 1);
    }
  }
  return dp[n];
}
int main() {
  string s;
  cin >> s;
  int r = solve(s);
  reverse((s).begin(), (s).end());
  cout << min(r, solve(s)) << endl;
  return 0;
}
