#include <bits/stdc++.h>
using namespace std;
template <class T>
void initvv(vector<vector<T> > &v, int a, int b, const T &t = T()) {
  v.assign(a, vector<T>(b, t));
}
template <class F, class T>
void convert(const F &f, T &t) {
  stringstream ss;
  ss << f;
  ss >> t;
}
string s;
int n;
vector<int> pal;
map<int, vector<int> > ma;
void mainmain() {
  cin >> s;
  n = s.size();
  pal = vector<int>(n);
  int state = 0;
  for (int(i) = (0); (i) < ((n)); ++(i)) {
    int t = 1 << (s[i] - 'a');
    state ^= t;
    pal[i] = state;
  }
  for (int i = n - 1; i >= 0; i--) {
    ma[pal[i]].push_back(i);
  }
  vector<int> dp(n + 1, 0x3f3f3f3f);
  dp[0] = 0;
  for (int(i) = (0); (i) < ((n)); ++(i)) {
    int t;
    if (i == 0)
      t = 0;
    else
      t = pal[i - 1];
    for (int(j) = (0); (j) < ((26)); ++(j)) {
      int a = t ^ (1 << j);
      for (int x : ma[a]) {
        if (x < i) break;
        dp[x + 1] = min(dp[x + 1], dp[i] + 1);
      }
    }
    int a = t;
    for (int x : ma[a]) {
      if (x < i) break;
      dp[x + 1] = min(dp[x + 1], dp[i] + 1);
    }
  }
  cout << dp[n] << endl;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(20);
  mainmain();
}
