#include <bits/stdc++.h>
using namespace std;
unordered_map<int, int> pos;
vector<int> dp;
void update(int v, int bit) {
  if ((pos.find(bit) == pos.end())) return;
  int next = pos[bit];
  if (v < next) {
    dp[next] = min(dp[next], dp[v] + 1);
  }
}
int main(void) {
  string s;
  cin >> s;
  int N = s.size();
  vector<int> bit(N + 1);
  dp = vector<int>(N + 1, 1e9);
  dp[0] = 0;
  for (int i = 0; i < int(N); ++i) {
    bit[i + 1] = bit[i] ^ (1 << (s[i] - 'a'));
    pos[bit[i + 1]] = i + 1;
  }
  for (int i = 0; i < int(N); ++i) {
    update(i, bit[i]);
    for (int j = 0; j < int(26); ++j) update(i, bit[i] ^ (1 << j));
  }
  cout << dp[N] << endl;
}
