#include <bits/stdc++.h>
using namespace std;
clock_t __stt;
inline void TStart() { __stt = clock(); }
inline void TReport() {
  printf("\nTaken Time : %.3lf sec\n",
         (double)(clock() - __stt) / CLOCKS_PER_SEC);
}
template <typename T>
T MIN(T a, T b) {
  return a < b ? a : b;
}
template <typename T>
T MAX(T a, T b) {
  return a < b ? a : b;
}
template <typename T>
T ABS(T a) {
  return a > 0 ? a : (-a);
}
template <typename T>
void UMIN(T &a, T b) {
  if (b < a) a = b;
}
template <typename T>
void UMAX(T &a, T b) {
  if (b > a) a = b;
}
int len, dp[200005], psum[200005][26], pv[200005], lastp[26];
pair<int, int> pre[200005];
char st[200005];
int main() {
  scanf("%s", st);
  len = strlen(st);
  int xb, x2;
  psum[0][st[0] - 'a'] = 1;
  pre[0] = make_pair(1 << (int)(st[0] - 'a'), 0);
  pv[0] = 1 << (int)(st[0] - 'a');
  for (xb = 1; xb < len; ++xb) {
    for (x2 = 0; x2 < 26; x2++) {
      psum[xb][x2] = psum[xb - 1][x2] + (('a' + x2) == st[xb]);
      if (psum[xb][x2] & 1) {
        pv[xb] |= (1 << x2);
      }
    }
    pre[xb] = make_pair(pv[xb], xb);
  }
  sort(pre, pre + len);
  memset(lastp, -1, sizeof(lastp));
  dp[0] = 1;
  lastp[st[0] - 'a'] = 0;
  for (xb = 1; xb < len; ++xb) {
    dp[xb] = dp[xb - 1] + 1;
    lastp[st[xb] - 'a'] = xb;
    int tar = pv[xb],
        pos = lower_bound(pre, pre + len, make_pair(pv[xb], 0)) - pre;
    if (pos < len && pre[pos].first == pv[xb] && pre[pos].second < xb)
      dp[xb] = MIN(dp[xb], dp[pre[pos].second] + 1);
    if (pv[xb] == 0)
      dp[xb] = 1;
    else
      for (x2 = 0; x2 < 26; ++x2) {
        if (lastp[x2] == -1) continue;
        tar ^= (1 << x2);
        pos = lower_bound(pre, pre + len, make_pair(tar, 0)) - pre;
        if (pos < len && pre[pos].first == tar && pre[pos].second < lastp[x2])
          dp[xb] = MIN(dp[xb], dp[pre[pos].second] + 1);
        if (tar == 0) {
          dp[xb] = 1;
          break;
        }
        tar ^= (1 << x2);
      }
  }
  printf("%d", dp[len - 1]);
  return 0;
}
