#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void upd1(T& a, T b) {
  a > b ? a = b : 0;
}
template <class T>
inline void upd2(T& a, T b) {
  a < b ? a = b : 0;
}
struct ano {
  operator long long() {
    long long x = 0, y = 0, c = getchar();
    while (c < 48) y = c == 45, c = getchar();
    while (c > 47) x = x * 10 + c - 48, c = getchar();
    return y ? -x : x;
  }
} buf;
const int N = 2e5 + 5;
char a[N];
int b[N], d[N], q[N], f[1 << 26];
int main() {
  scanf("%s", a + 1);
  int n = strlen(a + 1);
  for (int i = 1; i <= n; ++i) b[i] = b[i - 1] ^ 1 << a[i] - 97, f[b[i]] = i;
  for (int l = 0, r = 0; l <= r; ++l) {
    int u = q[l];
    for (int i = 0; i < 26; ++i) {
      int v = f[b[u] ^ 1 << i];
      if (v > u && !d[v]) d[v] = d[u] + 1, q[++r] = v;
    }
  }
  printf("%d\n", d[n]);
}
