#include <bits/stdc++.h>
using namespace std;
unordered_map<int, int> mp;
vector<int> bit;
vector<int> dp;
void update(int v, int state) {
  if ((mp.find(state) == mp.end())) return;
  int next = mp[state];
  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);
  bit[0] = 0;
  dp[0] = 0;
  for (int i = 0; i < int(N); ++i) {
    bit[i + 1] = bit[i] ^ (1 << (s[i] - 'a'));
    mp[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) {
      int next_bit = bit[i] ^ (1 << j);
      update(i, next_bit);
    }
  }
  assert(dp[N] != 1e9);
  cout << dp[N] << endl;
  return 0;
}
