#include <bits/stdc++.h>
using namespace std;
long long int N, a[26], d[364364], i, r, n, A;
bool u[364364];
queue<pair<long long, long long>> q;
vector<long long> e[364364];
unordered_multimap<long long, long long> m{{0, 0}};
char s[364364];
int main() {
  scanf("%s", s);
  N = strlen(s);
  for (i = 0; i < N; ++i) {
    for (int j = 0; j < 26; ++j) {
      d[i + 1] = d[i];
    }
    d[i + 1] ^= 1 << (s[i] - 97);
    m.insert(pair<long long, long long>{d[i + 1], i + 1LL});
  }
  fill(u, u + N, false);
  *u = true;
  q.push({0, 0});
  while (q.size()) {
    auto l = q.front();
    q.pop();
    r = l.first;
    A = l.second;
    if (r == N) return 0 & printf("%lld", A);
    for (int i = -1; i < 26; ++i) {
      if (i < 0)
        n = d[r];
      else
        n = d[r] ^ (1 << i);
      for (auto k = m.equal_range(n); k.first != k.second; ++k.first) {
        if (!u[k.first->second]) {
          q.push({k.first->second, A + 1});
          u[k.first->second]++;
        }
      }
    }
  }
  return 0;
}
