#include <bits/stdc++.h>
const long long inf = 1145141919;
const long long mod = 1000000007;
using namespace std;
template <class T>
void debug(T *a, long long l, long long r, const char *name) {
  for (long long i = l; i < r; i++)
    cout << name << "[" << i << "]=" << a[i] << endl;
}
long long N;
long long p[200001];
long long memo[200001];
unordered_map<long long, long long> ma;
long long saiki(long long n) {
  if (memo[n] == -1) {
    if (n == N)
      memo[n] = 0;
    else {
      long long u = 0;
      long long ans = inf;
      for (long long i = 0; i < 26; i++) {
        auto it = ma.find(p[n] ^ (1ll << i));
        if (it != end(ma) && it->second > n)
          ans = min(ans, saiki(it->second) + 1);
      }
      memo[n] = ans;
    }
  }
  return memo[n];
}
signed main() {
  long long i, j;
  string s;
  cin >> s;
  N = s.size();
  for (i = 0; i < N; i++) p[i + 1] = p[i] ^ (1ll << (s[i] - 'a'));
  if (p[N] == 0) {
    cout << 1 << endl;
    return 0;
  }
  for (i = 0; i <= N; i++) ma[p[i]] = i;
  fill(memo, memo + N + 1, -1);
  cout << saiki(0) << endl;
}
