#include <bits/stdc++.h>
using namespace std;
vector<int> edges[210000];
int main() {
  string str;
  cin >> str;
  int cur = 0;
  map<int, int> z;
  map<int, int> f;
  z[0] = 1;
  for (int i = 0; i < str.size(); i++) {
    int a = str[i] - 'a';
    cur ^= (1 << a);
    z[cur] = 1;
  }
  int c = 0;
  for (map<int, int>::iterator it = z.begin(); it != z.end(); it++) {
    f[it->first] = c;
    c++;
  }
  for (map<int, int>::iterator it = z.begin(); it != z.end(); it++) {
    int num = it->first;
    for (int j = 0; j < 26; j++) {
      int num2 = num ^ (1 << j);
      if (z.find(num2) == z.end()) continue;
      edges[f[num]].push_back(f[num2]);
      edges[f[num2]].push_back(f[num]);
    }
  }
  int dist[c];
  int vis[c];
  for (long long i = 0; i < c; i++) {
    dist[i] = 1e7;
    vis[i] = 0;
  }
  dist[f[0]] = 0;
  set<pair<long long, long long> > curset;
  for (long long i = 0; i < c; i++) {
    curset.insert(make_pair(dist[i], i));
  }
  while (!curset.empty()) {
    pair<long long, long long> v = *curset.begin();
    curset.erase(curset.begin());
    long long a = v.second;
    vis[a] = 1;
    for (int i = 0; i < edges[a].size(); i++) {
      long long b = edges[a][i];
      if (vis[b]) continue;
      if (1 + dist[a] < dist[b]) {
        curset.erase(make_pair(dist[b], b));
        dist[b] = dist[a] + 1;
        curset.insert(make_pair(dist[b], b));
      }
    }
  }
  cout << max(1, dist[f[cur]]) << endl;
}
