#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;
int sol(char* z) {
  if (!*z) return 0;
  int s = 0, a = 1e9;
  for (char* i = z; *i; ++i) {
    s ^= 1 << *i - 97;
    if (__builtin_popcount(s) <= 1) upd1(a, sol(i + 1) + 1);
  }
  return a;
}
char z[200005];
int main() {
  scanf("%s", z);
  printf("%d\n", sol(z));
}
