#include <bits/stdc++.h>
using namespace std;
const int INF = 0x2aaaaaaa;
const long long INFLL = 0x1f1f1f1f1f1f1f1fLL;
template <class A, class B>
inline ostream& operator<<(ostream& st, const pair<A, B>& P) {
  return st << "(" << P.first << "," << P.second << ")";
};
template <class A, class B>
inline pair<A, B> operator+(const pair<A, B>& P, const pair<A, B>& Q) {
  return pair<A, B>(P.first + Q.first, P.second + Q.second);
};
template <class A, class B>
inline pair<A, B> operator-(const pair<A, B>& P, const pair<A, B>& Q) {
  return pair<A, B>(P.first - Q.first, P.second - Q.second);
};
int n[1 << 26];
int P[200005];
bool u[200005] = {};
vector<int> G[200005];
int main() {
  string s;
  cin >> s;
  int N = s.size();
  int p = 0;
  memset(n, 0, sizeof(n));
  P[0] = 0;
  for (int i = 0; i < N; i++) {
    int t = s[i] - 'a';
    p ^= (1 << t);
    n[p] = i;
    P[i + 1] = p;
  }
  for (int i = 0; i < N; i++) {
    p = P[i];
    int m = n[p];
    G[i].push_back(m + 1);
    for (int j = 0; j < 26; j++) {
      if (n[p ^ (1 << j)] >= 0) {
        G[i].push_back(n[p ^ (1 << j)] + 1);
      }
    }
  }
  queue<pair<int, int> > Q;
  for (int a : G[0]) {
    u[a] = true;
    Q.push({a, 1});
  }
  while (!Q.empty()) {
    pair<int, int> b = Q.front();
    Q.pop();
    if (b.first == N) {
      cout << b.second << endl;
      return 0;
    }
    for (int a : G[b.first]) {
      if (u[a]) continue;
      u[a] = true;
      Q.push({a, b.second + 1});
    }
  }
  return 0;
}
