#include <bits/stdc++.h>
using namespace std;
string str;
int cnt[200005][27];
vector<int> bit[200005];
int dp[200005];
int bs[200005];
vector<int> bits;
int main(void) {
  cin >> str;
  int n = str.size();
  for (int i = 0; i < n; i++) {
    cnt[i + 1][str[i] - 'a']++;
  }
  for (int i = 0; i < 26; i++) {
    for (int j = 0; j < n; j++) {
      cnt[j + 1][i] += cnt[j][i];
    }
  }
  for (int i = 0; i < n; i++) {
    int bi = 0;
    for (int j = 0; j < 26; j++) {
      if (cnt[i + 1][j] % 2 == 1) bi += (1 << j);
    }
    bs[i + 1] = bi;
    bits.push_back(bi);
  }
  sort(bits.begin(), bits.end());
  bits.erase(unique(bits.begin(), bits.end()), bits.end());
  for (int i = 0; i < n; i++) {
    int v = lower_bound(bits.begin(), bits.end(), bs[i + 1]) - bits.begin();
    bit[v].push_back(i);
  }
  for (int i = 0; i <= n; i++) {
    dp[i] = 100000000;
  }
  dp[0] = 0;
  for (int i = 0; i < n; i++) {
    int nbit = bs[i];
    int nbit2 = lower_bound(bits.begin(), bits.end(), bs[i]) - bits.begin();
    if (nbit2 == bits.size() || bits[nbit2] != nbit) continue;
    int si = bit[nbit2].size();
    if (si > 0 && bit[nbit2][si - 1] >= i) {
      dp[bit[nbit2][si - 1] + 1] = min(dp[bit[nbit2][si - 1] + 1], dp[i] + 1);
    }
    for (int j = 0; j < 26; j++) {
      int nnbit = bs[i];
      if (nnbit >> j & 1) {
        nnbit -= 1 << j;
      } else {
        nnbit += 1 << j;
      }
      int nnbit2 = lower_bound(bits.begin(), bits.end(), nnbit) - bits.begin();
      if (nnbit2 == bits.size() || bits[nnbit2] != nnbit) continue;
      si = bit[nnbit2].size();
      if (si == 0) continue;
      if (bit[nnbit2][si - 1] >= i) {
        dp[bit[nnbit2][si - 1] + 1] =
            min(dp[bit[nnbit2][si - 1] + 1], dp[i] + 1);
      }
    }
  }
  printf("%d\n", dp[n]);
  return 0;
}
