#include <bits/stdc++.h>
char s[20001];
int n, dp[1001], f[1001], minn = 2147483640, m[40000000], k;
inline bool check(int x) { return (!x) | (!(x & (x - 1))); }
int main() {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  for (int i = 1; i <= n; i++) f[i] = (f[i - 1] ^ (1 << (s[i] - 'a')));
  memset(dp, 0x3f, sizeof(dp));
  for (int i = 1; i <= n; i++) {
    k = f[i];
    minn = 2147483640;
    if (check(k)) dp[i] = 1;
    if (k < 33554432 && m[k]) minn = m[k];
    for (int j = 0; j <= 25; j++) {
      k = k ^ (1 << j);
      if (k < 33554432 && m[k]) minn = std::min(m[k], minn);
      k = k ^ (1 << j);
    }
    dp[i] = std::min(dp[i], minn + 1);
    if (!m[f[i]] || m[f[i]] > dp[i]) m[f[i]] = dp[i];
  }
  printf("%d", dp[n]);
  return 0;
}
