#include <bits/stdc++.h>
using namespace std;
using Int = long long;
signed main() {
  string s;
  cin >> s;
  int n = s.size();
  vector<int> v(n + 1);
  v[0] = 0;
  map<int, vector<int> > m;
  m[0].push_back(0);
  for (int i = 0; i < n; i++) {
    v[i + 1] = v[i] ^ (1 << (s[i] - 'a'));
    if (m[v[i + 1]].empty()) m[v[i + 1]].push_back(-1);
    m[v[i + 1]].push_back(i + 1);
  }
  vector<int> dp(n + 1, 1 << 28);
  dp[0] = 0;
  for (int i = 0; i < n; i++) {
    int b = v[i];
    for (int j = 0; j < 26; j++) {
      b ^= (1 << j);
      if (m.count(b)) {
        int k = *--lower_bound(m[b].begin(), m[b].end(), i);
        if (k >= 0 && k < i) dp[i] = min(dp[i], dp[k] + 1);
      }
      b ^= (1 << j);
    }
    dp[i + 1] = min(dp[i + 1], dp[i] + 1);
    dp[m[b].back()] = min(dp[m[b].back()], dp[i] + 1);
    for (int j = 0; j < 26; j++) {
      b ^= (1 << j);
      if (m.count(b)) {
        dp[m[b].back()] = min(dp[m[b].back()], dp[i] + 1);
      }
      b ^= (1 << j);
    }
  }
  cout << dp[n] << endl;
  return 0;
}
