#include <bits/stdc++.h>
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
constexpr int inf = 1e9;
constexpr int N = 2e5;
char str[N + 1];
constexpr int ALPHA_SIZE = 'z' - 'a' + 1;
std::array<std::bitset<ALPHA_SIZE>, N + 1> A;
std::array<int, N + 1> DP;
int main(void) {
  scanf("%s", str);
  const int n = strlen(str);
  for (int(i) = (0); (i) < (n); ++(i)) {
    A[i + 1] = A[i];
    A[i + 1].flip(str[i] - 'a');
  }
  for (int i = 1; i <= n; ++i) DP[i] = inf;
  std::map<int, int> minDist;
  std::queue<int> Q;
  DP[0] = 0;
  Q.push(0);
  minDist[0] = 0;
  for (int i = 1; i <= n; ++i) {
    DP[i] = DP[i - 1] + 1;
    int v = A[i].to_ulong();
    std::map<int, int>::iterator itr;
    for (int(j) = (0); (j) < (ALPHA_SIZE); ++(j)) {
      int nv = v ^ (1 << j);
      itr = minDist.find(nv);
      if (itr != minDist.end()) chmin(DP[i], itr->second + 1);
    }
    itr = minDist.find(v);
    if (itr == minDist.end())
      minDist[v] = DP[i];
    else
      chmin(DP[i], itr->second + 1);
  }
  printf("%d\n", DP[n]);
  return 0;
}
