#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007ll;
const double EPS = 1e-11;
char s[252521];
int n;
int vec[252521];
map<int, int> tal;
int dp[252521];
int main() {
  scanf("%s", s);
  n = strlen(s);
  vec[0] = 0;
  for (int i = 0; i < (int)(n); ++i) {
    int id = s[i] - 'a';
    vec[i + 1] = vec[i] ^ (1 << id);
  }
  for (int i = 0; i < (int)(n + 1); ++i) tal[vec[i]] = max((tal[vec[i]]), (i));
  for (int i = 0; i < (int)(n + 1); ++i) dp[i] = 252521830;
  dp[0] = 0;
  for (int i = 0; i < (int)(n); ++i) {
    int v = vec[i];
    for (int j = 0; j < (int)(27); ++j) {
      int w = v ^ (1 << j);
      if (j == 26) w = v;
      int to = tal[w];
      if (to > i) {
        dp[to] = min((dp[to]), (dp[i] + 1));
      }
    }
  }
  printf("%d\n", dp[n]);
  return 0;
}
