#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n = s.size();
  vector<int> cnt(26);
  vector<vector<int>> pos(26);
  for (int i = 0; i < n; ++i) {
    cnt[s[i] - 'a']++;
    pos[s[i] - 'a'].push_back(i);
  }
  vector<int> masks(n + 1), dp(n + 1, n);
  map<int, int> pmask;
  pmask[0] = 0;
  for (int i = 0; i < n; ++i) {
    masks[i + 1] = masks[i] ^ (1 << (s[i] - 'a'));
    if (pmask.find(masks[i + 1]) == pmask.end()) pmask[masks[i + 1]] = i + 1;
  }
  dp[0] = 0;
  for (int i = 1; i <= n; ++i) {
    dp[i] = dp[i - 1] + 1;
    if (i != pmask[masks[i]]) {
      dp[i] = min(dp[i], dp[pmask[masks[i]]] + 1);
    }
    for (int j = 0; j < 26; ++j) {
      int target = masks[i] ^ (1 << j);
      if (pmask.find(target) != pmask.end())
        dp[i] = min(dp[i], dp[pmask[target]] + 1);
    }
  }
  cout << dp[n] << "\n";
  return 0;
}
