#include <bits/stdc++.h>
using namespace std;
char s[200010];
int dp[200010];
map<int, vector<int> > e;
map<int, vector<int> > v;
bool can[1 << 26];
int main() {
  int l;
  scanf("%s", s);
  for (l = 0; s[l]; l++)
    ;
  int b = 0;
  for (int i = 0; i < l; i++) {
    int x = s[i] - 'a';
    v[b].push_back(i);
    b ^= 1 << x;
  }
  can[b] = 1;
  v[b].push_back(l);
  for (int i = 0; i <= l; i++) {
    dp[i] = 10010001;
  }
  for (int i = l - 1; i >= 0; i--) {
    int x = s[i] - 'a';
    b ^= 1 << x;
    can[b] = 1;
    if (v[b][0] != i) continue;
    for (int j = 0; j < 26; j++) {
      int y = b ^ (1 << j);
      if (can[y]) {
        e[b].push_back(y);
      }
    }
    e[b].push_back(b);
  }
  dp[0] = 0;
  for (int i = 0; i < l; i++) {
    vector<int> &to = e[b];
    while (to.size()) {
      int y = to.back();
      to.pop_back();
      for (int j = 0; j < v[y].size(); j++) {
        if (dp[v[y][j]] > dp[i] + 1) {
          dp[v[y][j]] = dp[i] + 1;
        }
      }
    }
    int x = s[i] - 'a';
    b ^= 1 << x;
  }
  printf("%d\n", dp[l]);
  return 0;
}
