#include <bits/stdc++.h>
using namespace std;
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
  std::fill((T *)array, (T *)(array + N), val);
}
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
map<long long, long long> last;
bool flag[200001];
long long dp[200001];
long long bit[200001];
long long n;
long long calc(long long id) {
  if (n == id) return 0;
  if (flag[id]) return dp[id];
  flag[id] = 1;
  long long bits = 0;
  if (id != 0) bits = bit[id - 1];
  long long mi = 1000000007;
  if (last.find(bits) != last.end()) {
    long long k = last[bits];
    if (k >= id) {
      chmin(mi, 1 + calc(k + 1));
    }
  }
  for (long long i = 0; i < (long long)(26); ++i) {
    if (last.find(bits ^ (1 << i)) != last.end()) {
      long long k = last[bits ^ (1 << i)];
      if (k >= id) {
        chmin(mi, 1 + calc(k + 1));
      }
    }
  }
  return dp[id] = mi;
}
signed main() {
  string s;
  cin >> s;
  n = s.size();
  long long bits = 0;
  Fill(dp, 1000000007);
  for (long long i = 0; i < (long long)(n); ++i) {
    bits ^= (1 << (s[i] - 'a'));
    bit[i] = bits;
    last[bits] = i;
  }
  cout << calc(0) << endl;
  return 0;
}
