#include <bits/stdc++.h>
using namespace std;
int n, f[300000], dp[300000];
map<int, int> pos;
char s[300000];
void upd(int &x, int y) { x = min(x, y); }
int main() {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  for (int i = 1; i <= n; ++i) {
    f[i] = f[i - 1];
    f[i] ^= 1 << (s[i] - 'a');
    pos[f[i]] = i;
  }
  memset(dp, 0x3f, sizeof dp);
  dp[0] = 0;
  for (int i = 0; i < n; ++i) {
    upd(dp[pos[f[i]]], dp[i] + 1);
    for (int j = 0; j < 26; ++j) {
      upd(dp[pos[f[i] ^ (1 << j)]], dp[i] + 1);
    }
  }
  printf("%d\n", dp[n]);
  return 0;
}
