#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3fffffff;
int N;
char S[214514];
int cnt[214514][256];
bool even[214514];
int type[214514];
int dp[214514];
priority_queue<pair<int, pair<int, bool>>, vector<pair<int, pair<int, bool>>>,
               greater<pair<int, pair<int, bool>>>>
    q;
map<int, vector<int>> belong;
int main() {
  scanf("%s", S);
  N = strlen(S);
  type[0] = 0;
  belong[0].emplace_back(0);
  for (int i = 0; i < N; i++) {
    for (int j = 'a'; j <= 'z'; j++) {
      cnt[i + 1][j] = cnt[i][j];
    }
    cnt[i + 1][S[i]]++;
    int bit = 0;
    for (int j = 'a'; j <= 'z'; j++) {
      bit = (bit << 1) | (cnt[i + 1][j] % 2);
    }
    belong[bit].emplace_back(i + 1);
    type[i + 1] = bit;
  }
  fill(dp, dp + N + 1, INF);
  dp[0] = 0;
  q.push(pair<int, pair<int, bool>>(0, pair<int, bool>(0, false)));
  while (!q.empty()) {
    pair<int, pair<int, bool>> p = q.top();
    q.pop();
    int c = p.first;
    int v = p.second.first;
    bool calced = p.second.second;
    if (v == N) continue;
    if (dp[v] < c) continue;
    if (!calced) {
      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];
          q.push(pair<int, pair<int, bool>>(dp[u], pair<int, bool>(u, true)));
        }
        itr++;
      }
    }
    if (v < N) {
      if (dp[v + 1] > dp[v] + 1) {
        dp[v + 1] = dp[v] + 1;
        q.push(pair<int, pair<int, bool>>(dp[v + 1],
                                          pair<int, bool>(v + 1, false)));
      }
    }
  }
  if (!dp[N]) dp[N]++;
  printf("%d\n", dp[N]);
}
