#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 200020;
const int INF = 1 << 29;
int add(int a, int b) {
  if (a == INF || b == INF) {
    return INF;
  }
  return a + b;
}
int charMask[MAX_N];
unordered_map<int, int> dp[MAX_N];
int bitOf(char c) { return c - 'a'; }
int getRes(int pos, int offset, const string& s) {
  if (pos == (int)s.size()) {
    return INF;
  }
  if (dp[pos].find(offset) != dp[pos].end()) {
    return dp[pos][offset];
  }
  int res = getRes(pos + 1, offset, s);
  if (__builtin_popcount(charMask[pos] ^ offset) < 2) {
    res = min(res, add(1, (pos + 1 == (int)s.size()
                               ? 0
                               : getRes(pos + 1, charMask[pos], s))));
  }
  return dp[pos][offset] = res;
}
int main() {
  ios::sync_with_stdio(false);
  string s;
  cin >> s;
  int currMask = 0;
  for (int i = 0; i < (int)s.size(); ++i) {
    int bit = s[i] - 'a';
    currMask ^= 1 << bit;
    charMask[i] = currMask;
  }
  int res = getRes(0, 0, s);
  cout << res << endl;
  return 0;
}
