#include <bits/stdc++.h>
using ll = long long;
using namespace std;
template <class T>
inline void setmin(T& a, T const& b) {
  a = min(a, b);
}
constexpr int inf = 1e9 + 7;
int main() {
  string s;
  cin >> s;
  int n = s.length();
  vector<int> acc(n + 1);
  for (int i = 0; (i) < int(n); ++(i)) {
    acc[i + 1] = acc[i] ^ (1 << (s[i] - 'a'));
  }
  unordered_map<int, set<int> > f;
  vector<int> dp(n + 1, inf);
  dp[0] = 0;
  default_random_engine gen;
  for (int r = 0; (r) < int(n); ++(r)) {
    if (f[acc[r]].size() <= 300 or bernoulli_distribution(0.001)(gen)) {
      f[acc[r]].insert(r);
    }
    for (int c = 0; (c) < int(27); ++(c)) {
      int k = acc[r + 1] ^ (c == 26 ? 0 : (1 << c));
      if (f.count(k)) {
        for (int l : f[k]) {
          setmin(dp[r + 1], dp[l] + 1);
        }
      }
    }
  }
  cout << dp[n] << endl;
  return 0;
}
