#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  string s;
  cin >> s;
  int n = (int)s.size();
  vector<int> dp(n + 1, n);
  dp[0] = 0;
  unordered_map<int, vector<int> > pos;
  pos[0].push_back(0);
  for (int i = 0, cur = 0; i < n; ++i) {
    int j = int(s[i] - 'a');
    cur ^= (1 << j);
    if (pos.count(cur)) {
      for (int k : pos[cur]) dp[i + 1] = min(dp[k] + 1, dp[i + 1]);
    }
    for (int c = 0; c < 26; ++c) {
      int tmp = cur ^ (1 << c);
      if (pos.count(tmp))
        for (int k : pos[tmp]) dp[i + 1] = min(dp[i + 1], dp[k] + 1);
    }
    pos[cur].push_back(i + 1);
  }
  cout << dp[n] << endl;
  return 0;
}
