#include <bits/stdc++.h>
using namespace std;
int bc(int v) {
  int ans = 0;
  for (; v > 0; v >>= 1) {
    ans += v & 1;
  }
  return ans;
}
string S;
map<int, vector<int>> w;
int main() {
  cin >> S;
  const int N = S.size();
  int p[202020];
  fill(p, p + N, 0);
  for (int j = 0; j < N; ++j) {
    p[j] |= (1 << (S[j] - 'a'));
    if (j > 0) p[j] ^= p[j - 1];
  }
  int m[202020];
  for (int j = 0; j < N; ++j) m[j] = j + 1;
  m[0] = 1;
  w[p[0]].push_back(0);
  for (int j = 1; j < N; ++j) {
    if (bc(p[j]) <= 1) {
      m[j] = 1;
    }
    int v = p[j];
    if (w.find(v) != end(w)) {
      for (int idx : w[v]) {
        m[j] = min(m[j], m[idx] + 1);
      }
    }
    for (int j = 0; j < 26; ++j) {
      int x = v ^ (1 << j);
      if (w.find(x) != end(w)) {
        for (int idx : w[x]) {
          m[j] = min(m[j], m[idx] + 1);
        }
      }
    }
  }
  cout << m[N - 1] << endl;
  return 0;
}
