#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 P[200005];
bool u[200005] = {};
int n[200005];
int m[1 << 26];
map<int, int> f;
int main() {
  string s;
  cin >> s;
  memset(n, -1, sizeof(n));
  memset(m, -1, sizeof(m));
  int N = s.size();
  int p = 0;
  P[0] = 0;
  m[0] = 0;
  f[0] = 0;
  for (int i = 0; i < N; i++) {
    int t = s[i] - 'a';
    p ^= (1 << t);
    if (m[p] >= 0) {
      n[m[p]] = i + 1;
    }
    if (f.count(p) <= 0) f[p] = i + 1;
    m[p] = i + 1;
    P[i + 1] = p;
  }
  if (m[p] >= 0) {
    n[m[p]] = N + 1;
  }
  queue<pair<int, int> > Q;
  u[0] = true;
  for (int i = 0; i < 27; i++) {
    int p = (i == 26 ? 0 : (1 << i));
    for (int a = (f.count(p) ? f[p] : -1); a >= 0; a = n[a]) {
      if (u[a]) continue;
      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 i = 0; i < 27; i++) {
      int p = (i == 26 ? 0 : (1 << i));
      p ^= P[b.first];
      int t;
      for (int a = (f.count(p) ? f[p] : -1); a >= 0;
           t = a, a = n[a], n[t] = -1) {
        if (u[a]) continue;
        u[a] = true;
        Q.push({a, b.second + 1});
      }
    }
  }
  return 0;
}
