#include <bits/stdc++.h>
using std::cerr;
using std::cin;
using std::cout;
using std::map;
using std::pair;
using std::set;
using std::string;
using std::vector;
int main() {
  std::ios::sync_with_stdio(false);
  string s;
  cin >> s;
  int n = s.size();
  map<int, int> last;
  int c = 0;
  vector<int> d(n + 1);
  last[0] = 1;
  for (int i = 0; i < n; i++) {
    c ^= (1 << (s[i] - 'a'));
    d[i + 1] = d[i] + 1;
    if (last[c] == 0) {
      last[c] = i + 2;
    } else {
      d[i + 1] = std::min(d[i + 1], d[last[c] - 1] + 1);
    }
    for (int j = 0; j < 26; j++) {
      int x = last[c ^ (1 << j)];
      if (x > 0) {
        d[i + 1] = std::min(d[i + 1], d[x - 1] + 1);
      }
    }
  }
  cout << d[n] << "\n";
  return 0;
}
