#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3fffffff;
int N;
char S[214514];
int cnt[214514][256];
bool calced[214514];
int type[214514];
int dp[214514];
queue<int> qs[214514];
map<int, vector<int>> belong;
int main() {
  scanf("%s", S);
  N = strlen(S);
  type[0] = 0;
  belong[0].emplace_back(0);
  int bit = 0;
  for (int i = 0; i < N; i++) {
    bit ^= (1 << int(S[i] - 'a'));
    belong[bit].emplace_back(i + 1);
    type[i + 1] = bit;
  }
  fill(dp, dp + N + 1, INF);
  dp[0] = 0;
  qs[0].push(0);
  for (int i = 0; i <= N; i++) {
    while (!qs[i].empty()) {
      int v = qs[i].front();
      qs[i].pop();
      if (v == N) continue;
      if (!calced[v]) {
        auto &vec = belong[type[v]];
        auto itr = upper_bound(vec.begin(), vec.end(), v);
        while (itr != vec.end()) {
          int u = *itr;
          if (dp[u] > dp[v]) {
            dp[u] = dp[v];
            calced[u] = true;
            qs[i].push(u);
          }
          itr++;
        }
        for (int i = 0; i < 26; i++) {
          int t = type[v] ^ (1 << i);
          auto &vec = belong[t];
          auto itr = upper_bound(vec.begin(), vec.end(), v);
          if (itr == vec.end()) continue;
          int u = *itr;
          if (dp[u] > dp[v] + 1) {
            dp[u] = dp[v] + 1;
            qs[i + 1].push(u);
          }
        }
      }
    }
  }
  if (!dp[N]) dp[N]++;
  printf("%d\n", dp[N]);
}
