#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("avx")
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<int32_t> xoracc(n + 1);
  for (int i = 0; (i) < int(n); ++(i)) {
    xoracc[i + 1] = xoracc[i] ^ (1 << (s[i] - 'a'));
  }
  vector<int> dp(n + 1, inf);
  dp[0] = 0;
  for (int r = 0; (r) < int(n); ++(r)) {
    for (int l = 0; (l) < int(r + 1); ++(l)) {
      if (__builtin_popcount(xoracc[r + 1] ^ xoracc[l]) <= 1) {
        setmin(dp[r + 1], dp[l] + 1);
      }
    }
  }
  cout << dp[n] << endl;
  return 0;
}
