#include <bits/stdc++.h>
using namespace std;
char s[200001];
int d[200001];
int cnt[200001];
struct Nd {
  int x;
  vector<int> l;
} IT[530000];
int b;
bool has(vector<int> &v, int f) {
  auto it = lower_bound(v.begin(), v.end(), f);
  return it != v.end() && *it == f;
}
int findlast(int f) {
  int x = 1;
  if (!has(IT[1].l, f)) return -1;
  while (x < b) {
    if (has(IT[x * 2 + 1].l, f))
      x = x * 2 + 1;
    else
      x = x * 2;
  }
  return x - b;
}
int findlasta(int x) {
  int r = findlast(d[x - 1]);
  return r;
}
int main() {
  scanf("%s", s);
  int n;
  for (n = 0; s[n]; n++)
    ;
  for (b = 1; b <= n; b *= 2)
    ;
  for (int i = 1; i <= n; i++) {
    d[i] = 1 << (s[i - 1] - 'a');
    d[i] ^= d[i - 1];
    IT[b + i].x = d[i];
    IT[b + i].l.push_back(IT[b + i].x);
  }
  for (int i = b - 1; i >= 1; i--) {
    merge(IT[i * 2].l.begin(), IT[i * 2].l.end(), IT[i * 2 + 1].l.begin(),
          IT[i * 2 + 1].l.end(), back_inserter(IT[i].l));
  }
  int ans = 0;
  cnt[0] = 0;
  for (int i = 1; i <= n; i++) cnt[i] = 10000000;
  for (int i = 0; i < n; i++) {
    int t = findlast(d[i]);
    if (t > i) cnt[t] = min(cnt[t], cnt[i] + 1);
    for (int j = 0; j < 26; j++) {
      int t = findlast(d[i] ^ (1 << j));
      if (t > i) cnt[t] = min(cnt[t], cnt[i] + 1);
    }
  }
  printf("%d\n", cnt[n]);
  return 0;
}
