#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 200000;
const int INF = 1 << 30;
int bnums[1 << 13], cs[MAX_N + 1];
int dp[MAX_N + 1];
inline int bitnum(int bits) {
  return bnums[bits >> 13] + bnums[bits & ((1 << 13) - 1)];
}
inline void setmin(int &a, int b) {
  if (a > b) a = b;
}
int main() {
  bnums[0] = 0;
  for (int bits = 1, bi = 1; bits < (1 << 13); bits++) {
    if ((bi << 1) <= bits) bi <<= 1;
    bnums[bits] = bnums[bits ^ bi] + 1;
  }
  string s;
  cin >> s;
  int n = s.size();
  cs[0] = 0;
  for (int i = 0; i < n; i++) cs[i + 1] = cs[i] ^ (1 << (s[i] - 'a'));
  fill(dp, dp + n + 1, INF);
  dp[0] = 0;
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j <= n; j++)
      if (bitnum(cs[j] ^ cs[i]) <= 1) setmin(dp[j], dp[i] + 1);
  printf("%d\n", dp[n]);
  return 0;
}
