#include <bits/stdc++.h>
using namespace std;
using uint = unsigned int;
uint bitcount32(uint bits) {
  bits = (bits & 0x55555555) + (bits >> 1 & 0x55555555);
  bits = (bits & 0x33333333) + (bits >> 2 & 0x33333333);
  bits = (bits & 0x0f0f0f0f) + (bits >> 4 & 0x0f0f0f0f);
  bits = (bits & 0x00ff00ff) + (bits >> 8 & 0x00ff00ff);
  bits = (bits & 0x0000ffff) + (bits >> 16 & 0x0000ffff);
  return bits;
}
int main() {
  char s[200002];
  scanf("%s", s + 1);
  int n;
  for (n = 1; s[n] != 0; n++)
    ;
  n -= 1;
  uint count[200001];
  count[0] = 0;
  for (int i = 1; i <= n; i++) count[i] = count[i - 1] ^ (0x1u << (s[i] - 'a'));
  int dp[200001];
  dp[0] = 0;
  for (int i = 1; i <= n; i++) {
    dp[i] = i;
    for (int j = 0; j < i; j++)
      if (bitcount32(count[i] ^ count[j]) <= 1) dp[i] = min(dp[i], dp[j] + 1);
  }
  printf("%d\n", dp[n]);
}
