#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  string s;
  cin >> s;
  map<long long, long long> m;
  vector<long long> c(26, 0);
  vector<long long> d((long long)s.size() + 1);
  for (long long i = 0; i < (long long)s.size(); ++i) {
    long long buf1 = 1;
    long long buf2 = 0;
    for (long long j = 0; j < 26; ++j) {
      if (c[j] % 2 == 1) {
        buf2 += buf1;
      }
      buf1 *= 2;
    }
    d[i] = buf2;
    m[buf2] = 1000000000ll;
    c[s[i] - 'a']++;
  }
  long long buf1 = 1;
  long long buf2 = 0;
  for (long long i = 0; i < 26; ++i) {
    if (c[i] % 2 == 1) {
      buf2 += buf1;
    }
    buf1 *= 2;
  }
  d[(long long)s.size()] = buf2;
  m[buf2] = 1000000000ll;
  m[0] = 0;
  for (long long i = 0; i < (long long)s.size() + 1; ++i) {
    long long ret = 1000000000ll;
    ret = min(ret, m[d[i]] + 1);
    for (long long j = 0; j < 26; ++j) {
      long long buf = d[i];
      if (d[i] % (1 << (j + 1)) != d[i] % (1 << (j))) {
        buf -= (1 << (j));
      } else {
        buf += (1 << (j));
      }
      if (m.count(buf) != 0) ret = min(ret, m[buf] + 1);
    }
    m[d[i]] = min(m[d[i]], ret);
  }
  if (d[(long long)s.size()] == 0)
    cout << 0 << endl;
  else
    cout << m[d[(long long)s.size()]] << endl;
}
