#include <bits/stdc++.h>
using namespace std;
int n, f[300000], dp[300000], ans;
map<int, queue<int> > pos;
char s[300000];
void upd(int &x, int y) { x = min(x, y); }
void trans(int x, int i) {
  if (x == f[n]) upd(ans, dp[i] + 1);
  queue<int> &tmp = pos[x];
  for (; !tmp.empty() && tmp.front() <= i; tmp.pop())
    ;
  if (!tmp.empty()) upd(dp[tmp.front()], dp[i] + 1);
}
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]].push(i);
  }
  memset(dp, 0x3f, sizeof dp);
  dp[0] = 0;
  ans = n;
  for (int i = 0; i < n; ++i) {
    trans(f[i], i);
    for (int j = 0; j < 26; ++j) {
      trans(f[i] ^ (1 << j), i);
    }
  }
  printf("%d\n", ans);
  return 0;
}
