#include <bits/stdc++.h>
using namespace std;
multimap<int, int> mp;
vector<int> bit;
vector<int> dp;
void update(int v, int state) {
  auto p = mp.equal_range(state);
  for (auto it = p.first; it != p.second; ++it) {
    int next = it->second;
    if (v < next) {
      dp[next] = min(dp[next], dp[v] + 1);
    }
  }
}
int main(void) {
  string s;
  cin >> s;
  int N = s.size();
  bit = vector<int>(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'));
    mp.insert(make_pair(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;
  return 0;
}
