#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  string s;
  int n;
  cin >> s;
  n = s.size();
  static int xs[200001];
  for (int i = 0; i < n; ++i) xs[i + 1] = 1 << (s[i] - 'a');
  for (int i = 0; i < n; ++i) xs[i + 1] ^= xs[i];
  if (__builtin_popcount(xs[n]) <= 1) {
    cout << 1 << endl;
    return 0;
  }
  map<int, int> pos[2];
  for (int i = 0; i <= n; ++i) {
    pos[0][xs[i]] = min(i, pos[0][xs[i]]);
    pos[1][xs[i]] = max(i, pos[0][xs[i]]);
  }
  set<int> vs;
  map<int, vector<int>> edges;
  for (int i = 0; i <= n; ++i) vs.insert(xs[i]);
  for (int v : vs) {
    for (int i = 0; i < 26; ++i) {
      int u = v ^ (1 << i);
      if (pos[1].count(u) == 0) continue;
      if (pos[0][v] < pos[1][u]) edges[v].push_back(u);
    }
  }
  int bs = xs[0], bt = xs[n];
  map<int, int> dist;
  dist[xs[0]] = 0;
  queue<int> q;
  q.push(bs);
  while (!q.empty()) {
    int v = q.front();
    q.pop();
    for (int u : edges[v]) {
      if (dist.count(u) == 0 || dist[u] > dist[v] + 1) {
        dist[u] = dist[v] + 1;
        q.push(u);
      }
    }
  }
  cout << dist[xs[n]] << endl;
  return 0;
}
